How can we help you today? How can we help you today?
minijebu
Hi Alex, I tried the first method. Deployment went ok. But now,the issue is,when we do a  PULL and try to APPLY the changes on other developers' local instances,it fails. On the 'Get Latest' tab, we checked the differences in the versions on local instance and source control. The latest version on the source control included The structural change of the table(TableA),ie the new column(newColumnLevel) NOT NULLable is there. The static data changes,ie,The new values are there in the new column But once ,Apply changes is clicked,it failed The script is actually trying to create the table with the new column NOT NULLable and then it uses an INSERT statement which do not consider the new column at all. Something like this : CREATE TABLE [dbo].[RG_Recovery_1_TableA]<div>(</div><div>[id] [int] NOT NULL,</div><div>[description] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,</div><div>[cDate] [datetime] NOT NULL CONSTRAINT [DF_TableA_cDate] DEFAULT (getdate()),</div><div>[<b>newColumnLevel] [tinyint] NOT NULL</b><br></div><div>) ON [PRIMARY]</div><div>GO<br></div><div>IF @@ERROR <> 0 SET NOEXEC ON</div>GO<br> INSERT INTO [dbo].[RG_Recovery_1_TableA]([id], [description], [cDate]) SELECT [id], [description], [cDate] FROM [dbo].[TableA]--!!!!<i>the new column is not taken here and throws error</i>.<br><div>GO<br><div>IF @@ERROR <> 0 SET NOEXEC ON</div>GO</div> DROP TABLE [dbo].[TableA]GO<br><div>IF @@ERROR <> 0 SET NOEXEC ON</div>GO<br> EXEC sp_rename N'[dbo].[RG_Recovery_1_TableA]', N'TableA', N'OBJECT<br>GO&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>&nbsp;IF @@ERROR <> 0 SET NOEXEC ON<div>GO<br></div> Kind Regards minijebu / comments
Hi Alex,I tried the first method. Deployment went ok.But now,the issue is,when we do a  PULL and try to APPLY the changes on other developers' local instances,it fails.On the 'Get Latest' tab, we c...
0 votes