Skip to content

Instantly share code, notes, and snippets.

@javierav
Last active August 18, 2023 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javierav/40b054c5956299ecd634cd370fbfcf25 to your computer and use it in GitHub Desktop.
Save javierav/40b054c5956299ecd634cd370fbfcf25 to your computer and use it in GitHub Desktop.
  • db:migrate: runs migrations
  • db:create: creates the database
  • db:drop: deletes the database
  • db:schema:load: create tables using schema.rb and deleting existing data
  • db:setup: does db:create, db:schema:load, db:seed
  • db:reset: does db:drop, db:create, db:schema:load, db:seed
  • db:migrate:reset: does db:drop, db:create, db:migrate
  • db:prepare: does db:setup if database does not exists and db:migrate if exists
  • db:seed: load seed from db/seeds.rb
  • db:seed:replant: truncate tables and does db:seed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment