Comments
Sort by recent activity
I am using SSMS with the integrated SQL Source Control. The error happens when developers are syncing their test databases from source. The error is happening during the "Applying Schema changes to database" step. This seems to be happening before the data is synced. Is that the case or am I missing something? [image] If you want, here is the code to create that error: <div>CREATE TABLE dbo.MyTable (
MyField1 varchar(10) NOT NULL PRIMARY KEY</div><div>)</div> Static Data: <div>INSERT dbo.MyTable VALUES </div><div> ('ROW1'), </div><div> ('ROW2');</div> Post-Deployment Script: IF(@@SERVERNAME = 'TESTSERVER')
BEGIN
INSERT INTO [dbo].[MyTable] ([MyField1]) VALUES ('TESTROW')
ENDRunning the first time is successful. Running the second time results in a primary key violation. / comments
I am using SSMS with the integrated SQL Source Control. The error happens when developers are syncing their test databases from source.The error is happening during the "Applying Schema changes to...