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

ansible: skip validations before migration #148

Merged
merged 1 commit into from May 3, 2019

Conversation

Projects
None yet
2 participants
@pierre
Copy link
Member

commented May 2, 2019

If existing migrations have already been applied, Flyway will by default validate all of them before migrating.

Our Ansible playbook however only downloads the delta of migrations to run, not the full history: so if there are existing migrations, the playbook would fail.

Flyway has a flag ignoreMissingMigrations since 4.1.0, but our binary is still based on 4.0 and upgrading it is quite hard unfortunately.

Luckily validateOnMigrate skips that validation as well, so it offers a good workaround for now.

ansible: skip validations before migration
If existing migrations have already been applied, Flyway will by default
validate all of them before migrating.

Our Ansible playbook however only downloads the delta of migrations to
run, not the full history: so if there are existing migrations, the
playbook would fail.

Flyway has a flag ignoreMissingMigrations since 4.1.0, but our binary is
still based on 4.0 and upgrading it is quite hard unfortunately.

Luckily validateOnMigrate skips that validation as well, so it offers a good
workaround for now.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>

@pierre pierre requested a review from sbrossie May 2, 2019

@pierre pierre merged commit 7697290 into master May 3, 2019

4 of 5 checks passed

ci/circleci: test-mysql-jruby-1.7.26 Your tests failed on CircleCI
Details
ci/circleci: build-jruby-1.7.26 Your tests passed on CircleCI!
Details
ci/circleci: build-jruby-9.1.14.0 Your tests passed on CircleCI!
Details
ci/circleci: build-ruby-2.2.2 Your tests passed on CircleCI!
Details
ci/circleci: build-ruby-2.4.2 Your tests passed on CircleCI!
Details

@pierre pierre deleted the flyway-fixes branch May 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.