Managing Shared Database Schema

Governs a SQL database that two hosts read and write at the same time during a side-by-side migration. Use when a legacy .NET Framework app and a new .NET app share one database, point at the same connection string, or must both stay live while the schema changes. Covers which toolchain owns schema changes, expand-then-contract (additive-only) evolution, dual-write and backfill ordering, deployment ordering, and rollback rules. Triggers for "shared database", "who runs migrations", "dual write", "zero downtime schema change", or "add a column safely". Applies to EF6, EF Core, Dapper, ADO.NET, DACPAC/SqlPackage, DbUp and Flyway, and explains how EF6's __MigrationHistory and EF Core's __EFMigrationsHistory coexist without merging. Also use before deleting a Migrations folder, before enabling Database.Migrate() at startup, or when asked whether renaming or dropping a column is safe while the old app is live.

Microsoft a361299 2 files · 37.3 KB Updated 2.7k repo stars

File contents

microsoft/upgrade-agent-plugins/tree/main/plugins/upgrade-agent/upgrade/dotnet/skills/lazy/data/managing-shared-database-schema commit a361299507

Frequently asked questions

npx skillmds@latest add microsoft/managing-shared-database-schema