JetEntityFrameworkProvider
JetEntityFrameworkProvider copied to clipboard
Migration - Drop foreign key column - The name of the dropped relationship is wrong
The name is something like dbo. and it throws an exeption. To reproduce the behavior create 2 entities with a relationship then delete the relationship property.
Sample initializer
public DeliveryManagerContext(DbConnection connection)
: base(connection, false)
{
//Database.SetInitializer<DeliveryManagerContext>(null);
//return;
DbMigrationsConfiguration<DeliveryManagerContext> migrationConfiguration = new DbMigrationsConfiguration<DeliveryManagerContext>()
{
AutomaticMigrationsEnabled = true,
AutomaticMigrationDataLossAllowed = true
};
Database.SetInitializer(new MigrateDatabaseToLatestVersion<DeliveryManagerContext, DbMigrationsConfiguration<DeliveryManagerContext>>(true, migrationConfiguration));
}
I have this problem too. The name of the foreign key is always wrong. Is this going to be fixed? The name is "FK_dbo.Table1_dbo.Table2_ColumnName" instead of "FK_Table1_Table2_ColumnName".