Package org.cyclos.db
Class DatabaseUpgrade
- java.lang.Object
-
- org.cyclos.db.DatabaseUpgrade
-
public class DatabaseUpgrade extends Object
This is an executable class which upgrades the Cyclos database to the current version
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDatabaseUpgrade.StatusThe status of the current database
-
Constructor Summary
Constructors Constructor Description DatabaseUpgrade(TransactionTemplate transactionTemplate, JdbcTemplate jdbcTemplate, DatabaseHistory databaseHistory, CyclosProperties cyclosProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCurrentApplicationVersion()Returns the current application versionintgetCurrentDbVersion()Returns the current database versionDatabaseUpgrade.StatusgetStatus()Returns the current database statusvoidremoveStalePermissions()Removes any stale permissions from the databasevoidupgrade()Upgrade the current database to the latest version
-
-
-
Constructor Detail
-
DatabaseUpgrade
public DatabaseUpgrade(TransactionTemplate transactionTemplate, JdbcTemplate jdbcTemplate, DatabaseHistory databaseHistory, CyclosProperties cyclosProperties)
-
-
Method Detail
-
getCurrentApplicationVersion
public String getCurrentApplicationVersion()
Returns the current application version
-
getCurrentDbVersion
public int getCurrentDbVersion()
Returns the current database version
-
getStatus
public DatabaseUpgrade.Status getStatus()
Returns the current database status
-
removeStalePermissions
public void removeStalePermissions() throws SQLExceptionRemoves any stale permissions from the database- Throws:
SQLException
-
upgrade
public void upgrade() throws SQLExceptionUpgrade the current database to the latest version- Throws:
SQLException
-
-