When H2 database driver is updated converting the existing database to a new file format is often required.
Sadly H2 does not provide any suitable method of doing this without a lot of manual interaction.
Purpose of this tool is, to allow converting H2 from one version to another without manual interaction or usage of
multiple JVMs to run different versions of the H2 driver.
To use this tool, use the H2Updater.H2UpdaterBuilder to configure a update instance.
Use H2Updater.H2UpdaterBuilder.build() to create a new H2Updater instance and call convert(String, String) to
actually convert the database file.
The different H2 drivers required for conversion must be given when creating a H2Updater.H2UpdaterBuilder instance.
Therefore there is no need to put both driver in class path, because the driver is not picked from class path but from the given
JAR files.
So you can use the Update without messing up your class path with different H2 versions.
- Seit:
- 1.2.1 - 2023-11-16
- Autor:
- hypfvieh
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic enumOptions to configure export of original database.static classBuilder to create H2Updater instances.static classException which will be thrown if something went wrong.static enum -
Methodenübersicht
-
Methodendetails
-
convert
Convert the configured databases using the given credentials.- Parameter:
_dbUsername- username_dbPassword- password- Löst aus:
H2Updater.H2UpdaterException- when converting fails
-