Search code examples
entity-framework-6sql-server-ce

How do I get Entity Framework to generate migrations that will work with SQL Server CE?


When I add a migration scaffold, it includes commands that do not work with SQL Server CE. For instance the RenameColumn() and RenameIndex() functions will not execute on SQL Server CE.

Is there a way to set the code generator in Configuration:DbMigrationsConfiguration to generate SQL Server CE compatible commands?


Solution

  • SQL CE does not support index rename, you could manually add Drop and Create instead: https://entityframework.codeplex.com/workitem/2442

    SQL CE does not support column renames, only table renames