Interface DataMigrationManager

    • Method Detail

      • 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 version
        DataMigrationException - 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