Package org.h2.tools
Class Upgrade
java.lang.Object
org.h2.tools.Upgrade
Upgrade utility.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Driver
loadH2
(int version) Loads the specified version of H2 in a separate class loader.static void
Unloads the specified driver of H2.static boolean
upgrade
(String url, Properties info, int version) Performs database upgrade from an older version of H2.
-
Method Details
-
upgrade
Performs database upgrade from an older version of H2.- Parameters:
url
- the JDBC connection URLinfo
- the connection properties ("user", "password", etc).version
- the old version of H2- Returns:
true
on success,false
if URL is a remote or in-memory URL- Throws:
Exception
- on failure
-
loadH2
Loads the specified version of H2 in a separate class loader.- Parameters:
version
- the version to load- Returns:
- the driver of the specified version
- Throws:
IOException
- on I/O exceptionReflectiveOperationException
- on exception during initialization of the driver
-
unloadH2
Unloads the specified driver of H2.- Parameters:
driver
- the driver to unload- Throws:
ReflectiveOperationException
- on exception
-