Rails db:drop db:create db:migrate commands | rails & postgres

Is there a simple command to drop, create and migrate a production rails app deployed to Fly.io?

The documentation isn’t very clear on how to do this.

Please have a look here: I would like to know if there is a specific command for rails db:migrate:reset. - #33 by mateusz

Thanks @mateusz. Adding these lines to fly.rake file helped me seed my db:

task :disable_database_environment_check do
ENV[‘DISABLE_DATABASE_ENVIRONMENT_CHECK’] = ‘1’
end

task :setmigrate => ‘db:migrate VERSION1’

task :reset => [
‘fly:disable_database_environment_check’,
‘db:migrate:reset’,
‘db:migrate’,
‘db:seed’
]

From How To to Questions / Help

Added rails

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.