What problem does it solve?
Ensures consistent database schema changes across MySQL and SQL Server by guiding developers to create, validate, and apply separate EF Core migrations per database while handling database-specific differences and snowflake ID configuration.
Core Features & Use Cases
- Dual-database migration workflow: Step-by-step instructions to create matching migrations for MySQL and SQL Server using database-specific DbContext types.
- DbContext pattern and configuration guidance: Describes the recommended three-layer DbContext inheritance and how to configure ValueGeneratedNever for snowflake IDs.
- Database-specific adjustments: Notes on MySQL datetime, character set, boolean and long-text mappings and minimal SQL Server adjustments.
- Validation and automation scripts: Includes PowerShell scripts to validate migration files and apply migrations to both databases.
- Use Case: Add a new entity or modify fields and generate two synchronized migration sets that can be applied in development and committed to version control.
Quick Start
Create matching MySQL and SQL Server migrations for your service by running migrations against MySql{Service}DbContext and SqlServer{Service}DbContext and outputting them to Data/Migrations/MySql and Data/Migrations/SqlServer.