Skip to content

ci: add database migration step to deploy workflows#441

Merged
zbigniewsobiecki merged 1 commit intodevfrom
ci/deploy-migrations
Feb 20, 2026
Merged

ci: add database migration step to deploy workflows#441
zbigniewsobiecki merged 1 commit intodevfrom
ci/deploy-migrations

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

  • Adds a database migration step to both deploy.yml (prod) and deploy-dev.yml (dev) workflows
  • Migrations run automatically after image builds but before service restarts
  • Uses drizzle-kit migrate inside a Docker container built from the dashboard's builder stage
  • Prod uses secrets.DATABASE_URL, dev uses secrets.DEV_DATABASE_URL

Context

After merging the integration model refactor (#439), the dev server broke because the new code queries columns (category, provider, triggers) that don't exist until migration 0013 is applied. Previously, migrations were run manually. This change ensures migrations are always applied as part of the deploy pipeline.

Test plan

  • Verify DEV_DATABASE_URL secret exists in GitHub repository settings
  • Merge and confirm dev deployment applies migration 0013 successfully
  • Verify dev server recovers (integration endpoints return data)

🤖 Generated with Claude Code

Run drizzle-kit migrate before restarting services so schema changes
are applied automatically on each deploy. Uses the dashboard builder
stage (which has drizzle-kit and migrations) with the drizzle config
mounted from the workspace.

Requires DEV_DATABASE_URL secret for dev deploys and DATABASE_URL
secret for production deploys.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zbigniewsobiecki zbigniewsobiecki merged commit a24fdfa into dev Feb 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant