public class DbUpgrade extends Object
Constructor and Description |
---|
DbUpgrade() |
Modifier and Type | Method and Description |
---|---|
static Connection |
connectOrUpgrade(String url,
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 Connection connectOrUpgrade(String url, Properties info) throws SQLException
url
- the database URLinfo
- the propertiesSQLException
public 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.Copyright © 2012 JBoss by Red Hat. All Rights Reserved.