Skip to content

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

Description

@rbygrave

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions