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

generate flyway migrations from hibernate update scripts #43817

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rmanibus
Copy link
Contributor

@rmanibus rmanibus commented Oct 10, 2024

fix #43723

Current Process: When creating a database migration, the workflow is quite cumbersome:

  • Modify the entity.
  • Check the update script in the dev UI (when accessible—sometimes the app doesn't even start, making it unavailable).
  • Manually create a new migration file.
  • Customize the update script as needed.

This process involves redundancy, as the entity already contains the necessary information to at least generate a draft migration.

New Workflow: With this pull request, the process is simplified to:

  • Modify the entity.
  • Customize the update script as needed.

Migration naming convention:

  • major version is extracted from the previous migration
  • minor version is the current timestamp (current format is yyyyMMddHHmmss, but I think flyway might support something more readable like yyyy_MM_dd_HH_mm_ss)

Copy link

quarkus-bot bot commented Oct 10, 2024

Thanks for your pull request!

Your pull request does not follow our editorial rules. Could you have a look?

  • title should preferably start with an uppercase character (if it makes sense!)

This message is automatically generated by a bot.

Copy link

quarkus-bot bot commented Oct 10, 2024

/cc @gsmet (hibernate-orm), @yrodiere (hibernate-orm)

@gsmet
Copy link
Member

gsmet commented Oct 14, 2024

Thanks for the contribution. Could you clarify how it works and the cases that are covered?

@rmanibus
Copy link
Contributor Author

Thanks for the contribution. Could you clarify how it works and the cases that are covered?

@gsmet just updated the PR description

@rmanibus rmanibus force-pushed the fix_43723_hibernate_update branch 4 times, most recently from d8a4ba8 to bba1656 Compare October 28, 2024 02:49
@rmanibus
Copy link
Contributor Author

@gsmet I have been able to complete the test, this is now ready for review

This comment has been minimized.

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

Successfully merging this pull request may close these issues.

Generate Database Migration from hibernate model
2 participants