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

Incorrect script with Drop Table and function

АртурАртур Posts: 1 New member
edited June 14, 2018 7:59AM in SQL Compare
I use Source Control on Git Repository. I set up Filter.scpf and commit changes. I have several migration scripts.
When i generate deploy script with SQL Compare(V 13.3.8.6436): in deploy script have drop instruction for table constraints. And "DROP TABLE [dbo].[Sessions]" instruction. Next in the script there is an instruction "ALTER TABLE [dbo].[Sessions] ADD
[Step] [nvarchar] (max) COLLATE Cyrillic_General_CI_AS NULL". But this table is already removed.

There are also instructions for removing the function, which is used as the default value in the table, without removing the default limit. This also causes an error when running the script. The function and table are specified in the Filter.scpf.

Let's assume that this may be due to the addition of existing objects in the database(tables and functions) in the Filter.scpf. And SqlCompare does not take into account Filter changes.scpf between revisions. And applies the Filter.scpf from the last revision to all stages of the deployment script generation. In the first comments, the table or function has not yet been added to the Filter.spf and therefore SqlCompare generates an incorrect deployment script with the deletion of the object in the database.
Is there any way around this error? or will there be an update to fix this error?
Tagged:

Comments

Sign In or Register to comment.