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

SqlScriptFlywayCallback errors in ALL_CALLBACKS list #1326

Closed
frbo42 opened this issue May 31, 2016 · 1 comment
Closed

SqlScriptFlywayCallback errors in ALL_CALLBACKS list #1326

frbo42 opened this issue May 31, 2016 · 1 comment
Labels
Milestone

Comments

@frbo42
Copy link

@frbo42 frbo42 commented May 31, 2016

What version of Flyway are you using?

4.0.1

What database are you using (type & version)?

Oracle 12c

What operating system are you using?

Windows (for development)
Linux (prod)

By inspecting the code below, you will see that before_clean and after_clean, is added twice in the all_callback list.
while before_info and after_info is not added to the list:

public class SqlScriptFlywayCallback implements FlywayCallback {
private static final Log LOG = LogFactory.getLog(SqlScriptFlywayCallback.class);
private static final String BEFORE_CLEAN = "beforeClean";
private static final String AFTER_CLEAN = "afterClean";
private static final String BEFORE_MIGRATE = "beforeMigrate";
private static final String AFTER_MIGRATE = "afterMigrate";
private static final String BEFORE_EACH_MIGRATE = "beforeEachMigrate";
private static final String AFTER_EACH_MIGRATE = "afterEachMigrate";
private static final String BEFORE_VALIDATE = "beforeValidate";
private static final String AFTER_VALIDATE = "afterValidate";
private static final String BEFORE_BASELINE = "beforeBaseline";
private static final String AFTER_BASELINE = "afterBaseline";
private static final String BEFORE_REPAIR = "beforeRepair";
private static final String AFTER_REPAIR = "afterRepair";
private static final String BEFORE_INFO = "beforeInfo";
private static final String AFTER_INFO = "afterInfo";

public static final List<String> ALL_CALLBACKS = Arrays.asList(
        **BEFORE_CLEAN**, **AFTER_CLEAN**,
        BEFORE_MIGRATE, BEFORE_EACH_MIGRATE, AFTER_EACH_MIGRATE, AFTER_MIGRATE,
        BEFORE_VALIDATE, AFTER_VALIDATE,
        BEFORE_BASELINE, AFTER_BASELINE,
        BEFORE_REPAIR, AFTER_REPAIR,
        **BEFORE_CLEAN**, **AFTER_CLEAN**);`

The fix should be simple enough :)

@axelfontaine axelfontaine added the t: bug label Jun 1, 2016
@axelfontaine axelfontaine added this to the Flyway 4.0.2 milestone Jun 1, 2016
@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Jun 8, 2016

Good catch! Thanks!

axelfontaine added a commit to flyway/flywaydb.org that referenced this issue Jun 8, 2016
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
You can’t perform that action at this time.