Class AbstractResizeMigration
- java.lang.Object
-
- com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration
-
- com.xpn.xwiki.store.migration.hibernate.AbstractResizeMigration
-
- All Implemented Interfaces:
DataMigration
,HibernateDataMigration
- Direct Known Subclasses:
R140200010XWIKI19207DataMigration
public abstract class AbstractResizeMigration extends AbstractHibernateDataMigration
Extended by migrations which need to resize columns to the maximum index supported by MySQL: 768.- Since:
- 13.4.7, 13.10.3, 14.0RC1
- Version:
- $Id: fa949bea9bbf59629f7a8af8ee741d768a9f631e $
-
-
Field Summary
-
Fields inherited from class com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration
componentManager, manager
-
-
Constructor Summary
Constructors Constructor Description AbstractResizeMigration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescription()
String
getPreHibernateLiquibaseChangeLog()
XWikiDBVersion
getVersion()
protected void
hibernateMigrate()
Execute the migration itself.boolean
shouldExecute(XWikiDBVersion startupVersion)
-
Methods inherited from class com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration
getCurrentDBVersion, getLiquibaseChangeLog, getName, getStore, getXWikiContext, migrate
-
-
-
-
Method Detail
-
getDescription
public String getDescription()
- Returns:
- a description of what the data migration does
-
getVersion
public XWikiDBVersion getVersion()
- Returns:
- data version which need migration. before you commit stuff which needs migration, you need write data migration with version = current release number (i.e 32000 for release 3.2).
-
hibernateMigrate
protected void hibernateMigrate() throws DataMigrationException, XWikiException
Description copied from class:AbstractHibernateDataMigration
Execute the migration itself.- Specified by:
hibernateMigrate
in classAbstractHibernateDataMigration
- Throws:
DataMigrationException
- on migration error.XWikiException
- on error from the store.
-
shouldExecute
public boolean shouldExecute(XWikiDBVersion startupVersion)
- Specified by:
shouldExecute
in interfaceDataMigration
- Overrides:
shouldExecute
in classAbstractHibernateDataMigration
- Parameters:
startupVersion
- the database version when the migration process starts (before any dataMigration is applied). This is useful for data migration which need to run only when the database is in a certain version.- Returns:
- true if the migration should be executed or false otherwise
-
getPreHibernateLiquibaseChangeLog
public String getPreHibernateLiquibaseChangeLog() throws DataMigrationException
- Specified by:
getPreHibernateLiquibaseChangeLog
in interfaceHibernateDataMigration
- Overrides:
getPreHibernateLiquibaseChangeLog
in classAbstractHibernateDataMigration
- Returns:
- some liquibase changelogs for refactoring the database before the hibernate schema update is processed
- Throws:
DataMigrationException
- on error
-
-