Forum Discussion
Re-deploying a table with a primary key fails using SQL database projects in Azure data Studio
Hi DannyBr ,
I’m not sure if you’ve resolved this issue yet, but I encountered the same problem. I couldn’t find a setting in Azure Data Studio to restrict validation checks for constraints. What worked for me was disabling check constraints for INSERT and UPDATE statements in my table creation scripts.
Disable check constraints with INSERT and UPDATE statements - SQL Server | Microsoft Learn
For example:
CREATE TABLE [bus].[calendar_master]
(
[calendar_date] DATETIME2(6) NULL
);
GO
ALTER TABLE [bus].[calendar_master] ADD CONSTRAINT PK_calendar_master PRIMARY KEY NONCLUSTERED (calendar_date) NOT ENFORCED;
GO
ALTER TABLE [bus].[calendar_master] NOCHECK CONSTRAINT PK_calendar_master;
Thanks dsArchitect.
No I hadn't found a solution. We have moved on becuase in our short evaluation our findings were not favourable. For our required features we do not think it is ready for a end to end SDLC without significant effort on our part. There are too many missing or incorrectly working features and poor documentation for us at this stage. We will be staying with synapse for the time being and tactically using fabric/one-lake where adventagious. We may reconsider if/when the platform matures further.
Cheers.