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

Migrations with date-based versioning are incorrectly sorted #21

Open
bbucko opened this issue May 16, 2018 · 3 comments
Open

Migrations with date-based versioning are incorrectly sorted #21

bbucko opened this issue May 16, 2018 · 3 comments

Comments

@bbucko
Copy link

bbucko commented May 16, 2018

Versioned migrations with date-based scheme (e.g. v20180101__initial.sql) are not executed in proper order during migrate goal.

@jkubrynski
Copy link
Member

Thanks for the report. We definitely need to support date formats.

The problem is with the migration comment. Currently, we execute only files labeled as jpa2ddl (we're sure there are only schema changes here) and assume all others can contain data migrations. As invoking data migrations makes no sense (there is no data in the database set up by the plugin) we must have a pattern to distinguish it. Of course we can make it configurable, however, a good default is always welcome. Any suggestions here?

@bbucko
Copy link
Author

bbucko commented May 27, 2018

So why not just execute data migrations?

@jkubrynski
Copy link
Member

Unfortunately, data migration can be related to the existing data, that is not present in the database temporarily created by the plugin. That's why we need to separate it from the schema migrations

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

No branches or pull requests

2 participants