associations - Rails: How do I reset models and migrations? -
i've been working rails , of course have learned quite bit since started. i'm wanting keep lot of files i've made i'm wanting recreate many of models. since wasn't concerned losing information in database, ran rake db:drop:all
rid of tables , data. noticed still have migration files in folder db\migrate
. how should handle these? leave them , make changes models or should delete them in way. finally, there other files might still lingering around need delete/attend to?
running rake db:drop:all
clean database.
if plan on changing models , think migrations not reflect data model anymore, delete them.
you might want clean file db/schema.rb
too
you might want checkout rails migration guide http://guides.rubyonrails.org/migrations.html
Comments
Post a Comment