Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flyway.errorOverrides broken within callbacks #2229

Closed
seb-urbaniak opened this issue Dec 3, 2018 · 1 comment
Closed

flyway.errorOverrides broken within callbacks #2229

seb-urbaniak opened this issue Dec 3, 2018 · 1 comment

Comments

@seb-urbaniak
Copy link

@seb-urbaniak seb-urbaniak commented Dec 3, 2018

Which version and edition of Flyway are you using?

Flyway Pro Edition (20 schemas) 5.2.3

If this is not the latest version, can you reproduce the issue with the latest one as well?

(Many bugs are fixed in newer releases and upgrading will often resolve the issue)

Problem we are facing was resolved in 5.2.2
#2212

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

CMD

Which database are you using (type & version)?

MSSQL 2017

Which operating system are you using?

WIN 10

What did you do?

(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)

flyway.errorOverrides=S0001:0:I-
was included in my config.
statement in callback throwing a warning:
PRINT 'Rebuild FKs that lost their WITH CHECK flag.'

What did you expect to see?

No warnings on PRINT. (because the PRO edition is supposed to honour the errorOverrides switch)

What did you see instead?

Executing SQL callback: afterMigrate [non-transactional]
WARNING: DB: Rebuild FKs that lost their WITH CHECK flag. (SQL State: S0001 - Error Code: 0)

@axelfontaine axelfontaine added this to the Flyway 5.2.4 milestone Dec 4, 2018
@axelfontaine axelfontaine changed the title flyway.errorOverrides switch behaviour lost since correction in 5.2.2 flyway.errorOverrides does not work within callbacks Dec 4, 2018
@axelfontaine axelfontaine changed the title flyway.errorOverrides does not work within callbacks flyway.errorOverrides broken within callbacks Dec 4, 2018
axelfontaine added a commit that referenced this issue Dec 4, 2018
@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Dec 4, 2018

Thanks for the report. The callback was the key. errorOverrides are implemented internally as callbacks and we so far didn't handle callbacks within callbacks. We have now fixed this by making an exception and allowing errorOverrides to work within callbacks.

axelfontaine added a commit to flyway/flywaydb.org that referenced this issue Dec 4, 2018
dohrayme pushed a commit to dohrayme/flyway that referenced this issue Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants