Class R130200000XWIKI17200DataMigration
- java.lang.Object
-
- com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration
-
- com.xpn.xwiki.store.migration.hibernate.R130200000XWIKI17200DataMigration
-
- All Implemented Interfaces:
DataMigration,HibernateDataMigration
@Component @Named("R130200000XWIKI17200") @Singleton public class R130200000XWIKI17200DataMigration extends AbstractHibernateDataMigrationThis migration aims at applying the fix done on https://jira.xwiki.org/browse/XWIKI-15215 (change the type of some column so that they fit in the maximum allowed maximum row size for the used table type) instances older than 11.3RC1. Without this it's difficult to migrate to utf8mb3. It's also a requirement forAbstractResizeMigration.The columns are:
- LegacyEvent/activitystream_events
- url
- title
- body
- param1
- param2
- param3
- param4
- param5
- RefererStats/xwikistatsreferer
- referer
- VisitStats/xwikistatsvisit
- userAgent
- cookie
- XWikiPreferences/xwikipreferences
- leftPanels
- rightPanels
- documentBundles
- Since:
- 13.2RC1, 12.10.6
- Version:
- $Id: 7c5e58648ffb645ed63b52d4efbd76993a115f70 $
-
-
Field Summary
-
Fields inherited from class com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration
componentManager, manager
-
-
Constructor Summary
Constructors Constructor Description R130200000XWIKI17200DataMigration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()StringgetPreHibernateLiquibaseChangeLog()XWikiDBVersiongetVersion()protected voidhibernateMigrate()Execute the migration itself.booleanshouldExecute(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, XWikiExceptionDescription copied from class:AbstractHibernateDataMigrationExecute the migration itself.- Specified by:
hibernateMigratein classAbstractHibernateDataMigration- Throws:
DataMigrationException- on migration error.XWikiException- on error from the store.
-
shouldExecute
public boolean shouldExecute(XWikiDBVersion startupVersion)
- Specified by:
shouldExecutein interfaceDataMigration- Overrides:
shouldExecutein 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:
getPreHibernateLiquibaseChangeLogin interfaceHibernateDataMigration- Overrides:
getPreHibernateLiquibaseChangeLogin classAbstractHibernateDataMigration- Returns:
- some liquibase changelogs for refactoring the database before the hibernate schema update is processed
- Throws:
DataMigrationException- on error
-
-