I need to remove a few columns from my rails model which i already created and have some row entries in that model.
How to do it? Any links which has details for modifying the schema in rails ?
I’m using rails version 3.
I need to remove a few columns from my rails model which i already
Share
To remove a database column, you have to generate a migration:
Then in the self.up class method, remove your columns:
You may want to add them back in the self.down class method as well:
The Rails Guide for this goes into much more detail.