Skip to content

Instantly share code, notes, and snippets.

@giljr
Created November 22, 2025 15:05
Show Gist options
  • Select an option

  • Save giljr/802df60f44d686529bca0df9c0666d3e to your computer and use it in GitHub Desktop.

Select an option

Save giljr/802df60f44d686529bca0df9c0666d3e to your computer and use it in GitHub Desktop.
Is running rails db:drop db:create db:migrate the correct approach?
Command Action When to Use
rails db:reset Rebuild DB using schema.rb Faster, recommended for development
rails db:setup Create DB, load schema, seed When setting up a new project
rails db:drop db:create db:migrate Rebuild DB running migrations When testing migrations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment