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

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -