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

"Ignore system named constraint and index names" not working

vshclovervshclover Posts: 6 New member
edited January 22, 2024 8:38AM in SQL Compare
I have this option checked in my project's configuration, but still get a lot of tables as migration candidates with the only difference between the schema-model and the base being the system generated names of the column defaults.

here is the example of a table with only these two lines highlighted as being different (see attachment )-

[LoadDate] [datetime] NULL CONSTRAINT [DF__FACTSET_B__LoadD__4D4F32E2] DEFAULT (getdate()),
[iProcessed] [int] NULL CONSTRAINT [DF__FACTSET_B__iProc__4E43571B] DEFAULT ((0))

[LoadDate] [datetime] NULL CONSTRAINT [DF__FACTSET_B__LoadD__0DB632BF] DEFAULT (getdate()),
[iProcessed] [int] NULL CONSTRAINT [DF__FACTSET_B__iProc__0EAA56F8] DEFAULT ((0))

here is a part of my lfyway-dev.json file- 

capabilities": {
    "comparison": {
      "options": {
        "ignorePermissions": true,
        "ignoreSystemNamedConstraintNames": true
      }
    },

Flyway Desktop Enterprise

Version 7.0.3

Flyway engine: 10.4.1

Git: 2.43.0

Redgate Compare: 1.18.3.12399

sql server

Tagged:

Answers

  • Options
    Hi @vshclover

    I attempted to do a quick replication of your issue, on version 7.0.7, as well as the latest 7.0.11, and the 'Ignore system named constraint and index names' option is seemingly working for me. Instead of using the .json file, would you be able to try the 'Static data & comparison' option shown below in my screenshot?

    Also, as I have been unable to replicate it on a later version, would you be able to try updating to see if you can still replicate it?

    https://download.red-gate.com/checkforupdates/FlywayDesktop/FlywayDesktop_7.0.11.0.exe


    Kind regards,

    Kurt McCormick
    Product Support Engineer, Redgate

    Need help? Take a look at our Help Center

  • Options
    vshclovervshclover Posts: 6 New member
    Thank you Kurt, I did try using the UI as you have shown. Same result. My colleague also tried it, we are getting the same results.  No matter how we use this option - we still see the tables which differ only in the system generated default names show up on the list of differences. I am using 7.0.10
  • Options
    Hi @vshclover

    That's definitely quite strange. I've tested this a few ways and cannot seem to replicate your findings.

    Can you try this for me?
    1. Navigate to the project files > Schema-model > Tables
    2. Delete one of the table scripts where this issue is occurring on
    3. Refresh the Schema model tab in flyway
    4. Enable the 'Ignore system named constraint and index names' option
    5. Save the table to your project
    Let me know if if continues to appear in the schema-model screen with the ignore option set after doing these steps. 

    Kind regards,

    Kurt McCormick
    Product Support Engineer, Redgate

    Need help? Take a look at our Help Center

Sign In or Register to comment.