SQL-First-in-Migrations: Governing Every Database Artifact Through EF Core Migrations 1. Introduction Entity Framework Core's code-first approach is frequently understood as limited to entity classes and their table mappings. A production database contains more than tables: views, functions, stored procedures, triggers, indexes that EF Core does not natively model, and baseline operational data. If these artifacts are created or managed outside the migration stream, the project loses the single source of truth that code-first promises. The solution is to treat any SQL object on which the system depends as a first-class migration artifact. The pattern uses the EF Core migration timeline as the authoritative history for schema changes, SQL object changes, and baseline data, all driven from versioned SQL files. 2. The Core Idea EF Core's MigrationBuilder already records every entity-model change as a C# migration.…