Reputation: 96997
I have the db:seed
task which can add me initial data in the database. Is there anyway of clearing the database, so that it will remove all the contents of all the databases, but leave the tables there, so that I don't have to run all the migrations again?
Upvotes: 2
Views: 70
Reputation: 54802
If you re-setup a clean database, you shouldn't run the migrations, you should load the schema.rb
via db:schema:load
(bigger projects will have code in migrations that won't run anymore, for example because classes were renamed).
rake db:drop db:create db:schema:load db:seed
Upvotes: 3