DbUpgrade
This class starts the conversion from older database versions to the current
version if the respective classes are found.
| Methods |
| 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 Connection |
connectOrUpgrade(String url, Properties info) throws SQLException
If the upgrade classes are present, upgrade the database, or connect
using the old version (if the parameter NO_UPGRADE is set to true). If
the database is upgraded, or if no upgrade is possible or needed, this
methods returns null.
Parameters:
url - the database URL
info - the properties
Returns:
the connection if connected with the old version (NO_UPGRADE)
|
| static void |
setDeleteOldDb(boolean deleteOldDb)
Old files will be renamed to .backup after a successful conversion.
|
| static void |
setDeleteOldDb(boolean deleteOldDb)
Old files will be renamed to .backup after a successful conversion. To
delete them after the conversion, use this method with the parameter
'true'.
Parameters:
deleteOldDb - if true, the old db files will be deleted.
|
| static void |
setScriptInTempDir(boolean scriptInTempDir)
The conversion script file will per default be created in the db
directory.
|
| static void |
setScriptInTempDir(boolean scriptInTempDir)
The conversion script file will per default be created in the db
directory. Use this method to change the directory to the temp
directory.
Parameters:
scriptInTempDir - true if the conversion script should be
located in the temp directory.
|
|