How should Postgres migrations be handled on deploys?

For instance, the docs for deploying a Rails app have us configuring the ./bin/render-build.sh script as the build command, and this script runs rake db:migrate which executes the Postgres migration.

If the service is running on more than one host, is the build command run only once per deploy? Otherwise running the migration multiple times could potentially be dangerous.

Hello,

If the service is running on more than one host, is the build command run only once per deploy?

Yes, the build command will only be executed once.

1 Like

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