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

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -