Search code examples
entity-framework-coreentity-framework-core-migrations

How can i specify product version when working with migrations?


Here is a quick sample on how the [dbo].[__EFMigrationsHistory] table looks like:

EF migrations table

Is there a way to specify the ProductVersion when applying migrations?


Solution

  • Don't change the value in that column--it's used internally by EF.

    You can add a new column if you like by overriding the IHistoryRepository service. See Custom EF Core Migrations History Table to get started.