How to use it

Precompiled Binaries

Latest stable release: H2MigrationTool-1.5-all.jar

Development version: H2MigrationTool-1.6-SNAPSHOT-all.jar

Graphical User Interface
java -jar H2MigrationTool-all.jar
MIGRATION Command Line Options
java -jar H2MigrationTool-all.jar -l <arg> -f <arg> -t <arg> -d <arg>
     [-u <arg>] [-p <arg>] [-s <arg>] [-c <arg>] -o <arg> [--force] [-h]

-l,--lib-dir <arg>        Folder containing the H2 jar files.
-f,--version-from <arg>   Old H2 version of the existing database.
-t,--version-to <arg>     New H2 version to upgrade to.
-d,--db-file <arg>        The existing H2 database (old format).
-u,--user <arg>           The database username.
-p,--password <arg>       The database password.
-s,--script-file <arg>    The export script file.
-c,--compression <arg>    The Compression Method [ZIP, GZIP]
-o,--options <arg>        The upgrade options [VARIABLE_BINARY]
   --force                Overwrite files and continue on failure.
-h,--help                 Show the help message.
RECOVERY Command Line Options
java -cp H2MigrationTool-all.jar com.manticore.Recovery [-l <arg>] -f
     <arg> -d <arg> [-h]

-l,--lib-dir <arg>        (Relative) Folder containing the H2 jar files.
-f,--version-from <arg>   H2 version of the existing database.
-d,--db-file <arg>        The (relative) existing H2 database file.
-h,--help                 Show the help message.

Compile from Source Code

You will need to have JDK 11 installed since H2-2.2.224 and later depend on JDK 11 strictly. The minimal Maven build does not support the unit tests.

git clone https://github.com/manticore-projects/H2MigrationTool.git
cd H2MigrationTool
mvn install -DskipTests
git clone https://github.com/manticore-projects/H2MigrationTool.git
cd H2MigrationTool
gradle build

Maven Artifacts

<dependency>
    <groupId>com.manticore-projects.tools</groupId>
    <artifactId>h2migrationtool</artifactId>
    <version>1.5</version>
</dependency>
<repositories>
    <repository>
        <id>sonatype-snapshots</id>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
        <url>https://oss.sonatype.org/content/groups/public/</url>
    </repository>
</repositories>
<dependency>
    <groupId>com.manticore-projects.tools</groupId>
    <artifactId>h2migrationtool</artifactId>
    <version>1.6-SNAPSHOT</version>
</dependency>
repositories {
    mavenCentral()
}

dependencies {
    implementation 'com.manticore-projects.tools:h2migrationtool:1.5'
}
repositories {
    maven {
        url = uri('https://oss.sonatype.org/content/groups/public/')
    }
}

dependencies {
    implementation 'com.manticore-projects.tools:h2migrationtool:1.6-SNAPSHOT'
}