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

Consider using ServiceLoader to load JdbcMigrations (or load a factory that provides the JdbcMigrations) #90

Open
rbygrave opened this issue Aug 5, 2021 · 0 comments

Comments

@rbygrave
Copy link
Member

rbygrave commented Aug 5, 2021

Hi @rPraml , I have the thought that we can move away from classpath scanning for SQL DB migrations. So if we do that we could really change the way JdbcMigrations are found / loaded - change to using ServiceLoader instead.

Probably something like:

  • Add a new interface like JdbcMigrationFactory which has a method that creates JdbcMigration instances given a MigrationConfig
  • Use ServiceLoader to load the JdbcMigrationFactory(s) ... most people would probably create one factory
  • Ideally look to improve the JdbcMigration API such that we can provide an Ebean Database and Transaction such that the migration implementations can use the Ebean API more easily

I have a couple of things that are higher priority for me at the moment so this isn't an immediate thing plus we should look to make this change and still support the existing JdbcMigration mechanism.

Cheers, Rob.

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

1 participant