Class R140200000XWIKI19352DataMigration
- java.lang.Object
-
- com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration
-
- com.xpn.xwiki.store.migration.hibernate.R140200000XWIKI19352DataMigration
-
- All Implemented Interfaces:
DataMigration
,HibernateDataMigration
@Component @Singleton @Named("140200000XWIKI19352") public class R140200000XWIKI19352DataMigration extends AbstractHibernateDataMigration
Remove the xwikilinks table to allow it to be recreated from scratch. This is needed because we migrate from a composite id to a unique id key, and the composite id index is not removed automatically. While we could selectively remove the deprecated index, it is easier to remove the table and let it be recreated automatically, sinceR140200001XWIKI19352DataMigration
would drop all the table content anyway.- Since:
- 14.2
- Version:
- $Id: a0f26933e969efc83ef61d3e8a64ba3358b90945 $
-
-
Field Summary
Fields Modifier and Type Field Description static String
HINT
The hint for this component.-
Fields inherited from class com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration
componentManager, manager
-
-
Constructor Summary
Constructors Constructor Description R140200000XWIKI19352DataMigration()
-
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.-
Methods inherited from class com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration
getCurrentDBVersion, getLiquibaseChangeLog, getName, getStore, getXWikiContext, migrate, shouldExecute
-
-
-
-
Field Detail
-
HINT
public static final String HINT
The hint for this component.- See Also:
- Constant Field Values
-
-
Method Detail
-
getDescription
public String getDescription()
- Returns:
- a description of what the data migration does
-
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.
-
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).
-
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
-
-