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

Cannot insert the value NULL into column 'create_dt'

How to deploy?
tableabc in prod has data.
tableabc in dev has additional column "create_dt" with not null and no default value constraint.

I kept getting error:
SQL Compare aborting because Cannot insert the value NULL into column 'create_dt', table 'xyxz.dbo.RG_RECOVERY_1_tableabc
Cannot insert the value NULL into column 'create_dt', table xyxz.dbo.RG_RECOVERY_1_tableabc'; column does not allow nulls. INSERT fails.

Applications development completed with the insert calling getdate().

There are 50+ tables with this situation. Is there a quick way to deploy the additional column without doing it manually?
AmiW
0

Comments

1 comment

  • Mark J
    If you add a DEFAULT value to the create_dt column in dev, then Compare should fix null values using that default before applying the NOT NULL constraint. Does that help?
    Mark J
    0

Add comment

Please sign in to leave a comment.