Package com.xpn.xwiki.store.migration
Interface DataMigrationManager
-
- All Known Implementing Classes:
AbstractDataMigrationManager
,HibernateDataMigrationManager
@Role public interface DataMigrationManager
Interface for all migration managers.- Since:
- 3.4M1
- Version:
- $Id: b631d077d8c9aebdd6474e9ada8d51aa59b76a56 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
checkDatabase()
Check current database version and proceed to migrations.DataMigrationStatus
getDataMigrationStatus()
XWikiDBVersion
getDBVersion()
XWikiDBVersion
getLatestVersion()
void
initNewDB()
Setup the schema of a new DB and set it to the latest version (not running migrations).
-
-
-
Method Detail
-
getDBVersion
XWikiDBVersion getDBVersion() throws DataMigrationException
- Returns:
- current DB version or null for a new database
- Throws:
DataMigrationException
- if any error- xwiki.cfg configuration:
- xwiki.store.migration.version - override data version
-
getDataMigrationStatus
DataMigrationStatus getDataMigrationStatus() throws DataMigrationException
- Returns:
- current DB migration status or null for a new database
- Throws:
DataMigrationException
- if any error- Since:
- 4.4.1
-
checkDatabase
void checkDatabase() throws MigrationRequiredException, DataMigrationException
Check current database version and proceed to migrations. Migration is processed only once, and depends on the following configuration:- Throws:
MigrationRequiredException
- when version is incompatible with current versionDataMigrationException
- when an error occurs during check.- xwiki.cfg configuration:
- xwiki.store.migration - 1 to enable migration, default to 0, xwiki.store.migration.databases - list of database to migrate, default to all, xwiki.store.migration.forced - force run selected migrations, xwiki.store.migration.ignored - ignore selected migrations, xwiki.store.migration.exitAfterEnd - 1 to exit at the end of migrations, default to 0
-
getLatestVersion
XWikiDBVersion getLatestVersion()
- Returns:
- latest DB version
- Since:
- 3.4M1
-
initNewDB
void initNewDB() throws DataMigrationException
Setup the schema of a new DB and set it to the latest version (not running migrations). This should be used on a newly created DB only- Throws:
DataMigrationException
- if any error- Since:
- 3.4M1
-
-