Skip to content

script based FileMigrationLoader #112

Open
@chb0github

Description

@chb0github

The MigrationLoader and the FileMigrationLoaderFactory make things really flexible. But, I would like to propose another implementation that will really open up mybatis to non-java developers and allow for a light-touch

Some background:

The situation I am trying to address requires a custom MigrationLoader. And, it seems to be working the way I would like it to be. But, let's consider what I will need to do to take advantage of it

  1. Create a java project: (pom.xml, directory structures, etc.) because I have to pull in the mybatis interfaces
  2. Build a jar
  3. Release it to an artifact repository
  4. Deploy it. Which, in the case of migrations, means I would have to put it in the drivers directory since I know this will get picked up on the class path. Should I create a custom migrations script to check to see if it has the latest migration loader I wrote before running and download it if needed (including getting around any security issues I might encounter while checking with the artifact repo)? Or, should I just check in the jar into the migration project under drivers and update as needed?

The question thus arises: Where should I put this Java project that consists entirely of 2 java files and 1 meta file?

Should I:

  1. Create a new repo internally to manage it (and a build and release process)
  2. Create maven/java directory structures in the current repo containing nothing but sql scripts meant for migrations? (Which is only really going to be used by DBAs).

Option 1 is really a heavy weight process to get about 40 lines of code in use
Option 2 is bound to really confuse people who are totally unfamiliar with java.

It would really open up migrations to non-java developers (or java developers where a heavy touch process is not desired). We could use the existing scripting configuration/functionality.

I am willing to make the changes and make sure they are backward compatible. I would just like to donate it to the community because I think it would allow for a very light foot-print when customizing and because it would be a stand-out feature from all the other migration tools.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions