martinjw/dbschemareader

SqlServerMigrationGenerator.FindDefaultConstraint uses the new column name to drop constraints of the old column

Arnagos opened this issue · 2 comments

SqlServerMigrationGenerator.FindDefaultConstraint uses the new column name to drop constraints of the old column. This prevents the application form finding the existing default constraint when both the default value and the name of the column have changed at the same time.

Old column:
image

New column:
image

Result: Existing default value not found; new one gets created anyway -> System.Data.SqlClient.SqlException (0x80131904): Column already has a DEFAULT bound to it.

Now released to nuget