ruby on rails - How can I empty all the results in the database? -


I have the db: seed function that can add initial data to the database The database is cleaned so that it removes all the contents of the database, but leave the tables there so that I do not need to run all the migration again?

If you set up a clean database again, then you should not run the migration, Code should be loaded by schema.rb DB: schema: Load (Large projects will have code in migration which will no longer run, for example, because the name of the class changed I went).

  rake db: drop db: make db: schema: load db: bead    

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -