Created
June 8, 2012 01:51
-
-
Save chrisbloom7/2892962 to your computer and use it in GitHub Desktop.
Extend Rails' defaut set of rake tasks to add a db:bootstrap task. Similar to db:reset but doesn't use the schema file. Useful for testing your complete migration set (i.e. simulating a fresh setup) or for resetting your seed data in development.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :db do | |
desc "Completely tears down the database, rebuilds it from scratch using your migrations (i.e. ignoring the current schema file), re-seeds the database based on the current environment, and finally prepares the test database" | |
task :bootstrap => ["db:drop", "db:create", "db:migrate", "db:seed", "db:test:prepare"] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently getting an error during the
db:seed
portion - rails/arel#124. Not sure when or where this started happening, but seems to be coming from Arel.