How does Hatchbox run Rails migrations?

Rails migrations are automatically run on deploy on the cron server, but you can add an environment variable to skip this step.

Written by Chris Oliver
Updated over a week ago
Hatchbox automatically runs migrations (rails db:migrate) if:
  1. You have a server with the "Cron" role
  2. Your app has a "rails db:migrate" task
To disable Rails migrations, you can add an environment variable "HATCHBOX_SKIP_MIGRATE=1" and the rails db:migrate task will not be run during deploy.

Was this article helpful?