flyway "Ignore system named constraint and index names" compare option is not working
vshclover
Posts: 6 New member
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 )-
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 fyway-dev.json file-
here is a part of my fyway-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
I set the option in Flyway Desktop: schema model screen/static data and comparisons/comparison options/Ignore system named constraint and index names = checked
This set the following in my flyway.toml file (it might be worth converting your flyway-dev.json to toml just in case this helps)
And In the Generate migrations screen, it correctly ignores the constraint names.
Product Manager
Redgate Software