rails db:migrate Execution of migration file to DB Automatically db: schema: dump is also executed and schema.rb is updated rails db:rollback Return the DB before executing the migration file rails db:schema:load Apply the contents of schema.rb to the currently referenced DB Used when loading into an empty DB rails db:schema:dump Reflect DB in schema.rb rails db:create DB creation rails db:drop Delete DB rails db:reset The following is omitted rails db:drop rails db:create rails db:schema:load Use only schema files rails db:migrate:reset The following is omitted rails db:drop rails db:create rails db:schema:load Use migration files directly rails db:seed Initial data added to table rails db:migrate:reset db:seed Delete & create database, add initial data to table
Recommended Posts