Workflow Deployment

Deploy Database Changes

Safe workflow for deploying schema changes to production

deploymentdatabasemigration
CLAUDE.md

When deploying database changes to production:

  1. Back up the production database before running any migration.
  2. Run the migration on a staging environment first with production-like data.
  3. Verify the migration completes within an acceptable time window. Large table migrations may need special handling.
  4. Deploy the migration to production during a low-traffic period if it involves locking.
  5. Monitor the migration progress and database performance during execution.
  6. Verify the application works correctly against the new schema.
  7. Keep the rollback migration ready. If issues arise within the first hour, run it immediately.

Copy this workflow into your CLAUDE.md or agent config file so your agent follows this process automatically.

get crystl