What are the challenges you face when working across database platforms? Take the survey

SQL Compare abort with error

AmiWAmiW Posts: 4
edited April 27, 2015 12:17PM in SQL Compare 11
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.



  • Options

    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
    Red Gate Software
    US Product Support
Sign In or Register to comment.