How can we help you today? How can we help you today?

SQL Compare abort with error

Prod tableabc already has data.
Dev tableabc has additional column "create_dt" with not null and no default value constraints

When I try to deploy, I get error:
Cannot insert the value NULL into column 'create_dt', table 'dbname.dbo.RG_RECOVERY_1_tableabc'
Cannot insert the value NULL into column 'create_dt', table 'dbname.dbo.RG_RECOVERY_1_tableabc'; column does not allow nulls. INSERT fails.

Application development completed with insert calling getdate(). It's too late to add default value constraints.

Is there a quick way using SQL Compare to deploy the table changes? The above is just an example of the problems. I have 60+ tables to deploy with similar changes plus other table structure changes.

HELP!
AmiW
0

Comments

1 comment

  • Allen LeVan
    Hello,

    If the issue is with SQL Data Compare and it's trying to insert 'null' values from source where the target does not allow it then there is no fix SQL Data Compare can do as tSQL is preventing the illegal transaction. The schema would need to be updated to allow nulls or the nulls removed from the source.
    Allen LeVan
    0

Add comment

Please sign in to leave a comment.