schema-migrations-safely
Decides whether a schema change is safe to apply to a live Azure SQL Database, and rewrites the migration so it is. Use when someone asks "is this migration safe to run in production", "can I add this column without downtime", "zero downtime schema change", "expand and contract", "blue green database deploy", "make this migration re-runnable", "should the app run migrations at startup", or "how do I roll this back"; and when a deployment blocked every query, instances fought over the same migration, or a retry applied its backfill twice. Covers metadata-only versus table-rewriting alterations, the schema lock that blocks readers under snapshot isolation, ONLINE and RESUMABLE, and why a guard is not a guard under concurrency or retry. Tooling is sql-database-projects and github-actions-for-sql, ORM migrations their own skills, the table design design-azure-sql-schema.
Pinned to revision eeb1c6867c2d, so it is the text this page describes rather than whatever the author pushed since.
Files
- skills/schema-migrations-safely/SKILL.md
- skills/schema-migrations-safely/references/alter-cost-schema-locks-and-retry.md
Every link opens the file at its source, pinned to the revision this page describes.