public class DbUpgrade
extends java.lang.Object
| Constructor and Description |
|---|
DbUpgrade() |
| Modifier and Type | Method and Description |
|---|---|
static java.sql.Connection |
connectOrUpgrade(java.lang.String url,
java.util.Properties info)
If the upgrade classes are present, upgrade the database, or connect
using the old version (if the parameter NO_UPGRADE is set to true).
|
static void |
setDeleteOldDb(boolean deleteOldDb)
Old files will be renamed to .backup after a successful conversion.
|
static void |
setScriptInTempDir(boolean scriptInTempDir)
The conversion script file will per default be created in the db
directory.
|
public static java.sql.Connection connectOrUpgrade(java.lang.String url,
java.util.Properties info)
throws java.sql.SQLException
url - the database URLinfo - the propertiesjava.sql.SQLExceptionpublic static void setScriptInTempDir(boolean scriptInTempDir)
scriptInTempDir - true if the conversion script should be
located in the temp directory.public static void setDeleteOldDb(boolean deleteOldDb)
deleteOldDb - if true, the old db files will be deleted.