Rails MySQL custom field, raw SQL on runtime -
when user opts create custom field email model contact(name,mobile), crime execute system command "mysql -u poi -pjuking db -e 'alter table contacts add column email varchar(255)" , somehow add :email attr_accessible in contact model....?
do not this
yes, altering source felony (what happens when running on multiple machines) need update cluster. same thing goes db.
instead use hstore in postgres or serialize field custom attributes if on mysql.
Comments
Post a Comment