View Full Version : Ruby on Rails Question : about my Schema.rb file

March 8th, 2009, 10:31 AM

I am trying to change my schema.rb file so that I have different fields in my database. So I change it, save it then run "rake db:migrate" but it reverts my schema.rb file back, saving over the old stuff! Am I doing something wrong?

The Net duck

March 9th, 2009, 12:38 AM
If I'm not wrong, the schema.rb is auto-generated, so you have to edit the migrations definitions. If you want to add new columns to a table, you better create new migrations. Another option is migrate your DB to version 0 and migrate to last version again, but it will clear your database.