ebean-orm / ebean-orm/ebean-migration
Consider using ServiceLoader to load JdbcMigrations (or load a factory that provides the JdbcMigrations)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing JdbcMigration discovery and loading mechanism. Compare its behavior with the proposed ServiceLoader approach and consider how JdbcMigrationFactory, MigrationConfig, Ebean Database, and Transaction would fit while preserving the existing mechanism. Done means the design and compatibility requirements are resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100