Automate database migrations in CI
Run database migrations automatically in CI before the new app version starts. Ensures idempotency, auto-rollback on failure, and visible pipeline status.
Preview
Copy prompt
Add automated database migration steps to a [CI/CD platform] pipeline for a [Language/ORM] application. The migration step must run after the new image is built but before the new application version starts receiving traffic. Ensure the migration is idempotent so re-running it is safe. Implement automatic rollback if the migration fails and surface the migration status as a clearly labelled step in the pipeline UI.
More
DevOps
Prompts
