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 7 Breaking Changes Announcements #2705

Closed
Lyeeedar opened this issue Mar 4, 2020 · 7 comments
Closed

Flyway 7 Breaking Changes Announcements #2705

Lyeeedar opened this issue Mar 4, 2020 · 7 comments

Comments

@Lyeeedar
Copy link
Contributor

Lyeeedar commented Mar 4, 2020

Flyway 7 is released!

Flyway 7 has now been released. You can find the official list of the breaking changes in the release notes: https://flywaydb.org/documentation/releaseNotes#7.0.0.

The text below is possibly out of date now. I'll keep it for posterity. Refer to the release notes for the complete information.


Flyway 7 is due roughly in the summer of this year. We plan to make the following breaking changes on the first version 7 release:

Platform support

Breaking changes

Comments and questions are welcome. This post will be updated with more changes in the run up to version 7.

@Lyeeedar Lyeeedar added this to the Flyway 7.x milestone Mar 4, 2020
@Lyeeedar Lyeeedar pinned this issue Mar 4, 2020
@stellingsimon
Copy link

stellingsimon commented Mar 15, 2020

Thanks for announcing these changes early on and allowing us to comment.

Non-existent locations in flyway.locations will produce errors instead of warnings

As long as these locations may be empty without Flyway considering that to be an error, this is a great idea. I lost countless hours to debugging Flyway only to find out I had a typo in one of the locations.

Zooming out a little, though, it feels like a breach with the concept of "dynamic discovery" currently used:

As it is now, it feels to me like Flyway is trying to be "smart" with information about the migrations being decentralized, so locations was always interpreted as "look in these places and figure out what to do".

(Many disliked this "smartness", including me, see #2698, #2541, #2610, #2647, #2683, ...)

In contrast, it could be "dumb", with information about the migrations being centralized, so instead of locations I provide a MigrationManifest to Flyway, telling it exactly what to do in which order with which options. In this world, it better report errors at the first ambiguity.

By being strict on "locations" (which is one of the few centralized configuration points), Flyway somewhat limits the ways I interact with it. For example, we currently have just one Flyway configuration for both production and setups with a test fixture:

locations=classpath:migrations/prod,classpath:migrations/testfixture

Since we make sure not to include demo-data in a production setup, there is no need to have two different Flyway configurations. So with Flyway 7.0, we'll either have to make structural changes to our deployment setup. Providing an empty classpath:migrations/textfixture in production JARs just to make Flyway happy looks tempting but would ultimately lead to people accidentally placing files there.

In conclusion, I'd like the following most:

  • a "smart" mode with a lenient location configuration parameter, where Flyway is expected to be "smart", trying its best but not failing.
  • a "dumb" mode with a non-lenient MigrationManifest configuration parameter, where Flyway is given precise instructions and thus failing as soon as it detects those instructions to be nonsensical.

Lacking that, I'd wish for a configuration option treatMissingLocationAsError with a default value of true.

@cowwoc
Copy link

cowwoc commented Apr 28, 2020

Use of dots (.) as path separators in flyway.locations will be deprecated and produce an error when used

Can you please provide an example of using dots (.) as path separators to help us understand what kind of cases will be forbidden?

@MikielAgutu
Copy link

@cowwoc Internally, paths that began with classpath: have dots replaced with slashes. So a location like this:

classpath:path.to.my.migration

Is converted internally to:

classpath:path/to/my/migration

Such paths will produce an error in V7.

The code is in Location.java.

@cowwoc
Copy link

cowwoc commented May 5, 2020

@MikielAgutu Perfect, thanks.

@slsshetty
Copy link

Any update on support to have the script location from s3 bucket path

@Lyeeedar
Copy link
Contributor Author

Any update on support to have the script location from s3 bucket path

This will be coming in Flyway v7. We do not have a release date for this, but you can see the v7 work on the v7 branch: https://github.com/flyway/flyway/tree/v7

@slsshetty
Copy link

Any update on support to have the script location from s3 bucket path

This will be coming in Flyway v7. We do not have a release date for this, but you can see the v7 work on the v7 branch: https://github.com/flyway/flyway/tree/v7

That is Great,Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants