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 AbstractHibernateDataMigration
This 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 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
-
-