I recently started using Rails, and created a few Models using the CLI which in turn created some migrations.
I ran the rake db:migrate
command after adding all my columns in there, and then realized that I'd left out the associations.
So what did I do? I went ahead and edited the migrations to include those keys.
I ran rake db:migrate
again, and nothing changed in the schema.
Then I ran rake db:reset
and then rake db:setup
.
When that didn't work, I deleted my schema.rb
(the darn thing wouldn't get updated!) and tried recreating it. When I realized that didn't work, I dropped the database, and killed the schema.
Now I'm stuck with some manually modified migrations, no schema.rb
and no database.
How do I get the modified migrations to generate a schema, and play nice with Rails?