com.xpn.xwiki.store.migration.hibernate
Class R35102XWIKI7771DataMigration

java.lang.Object
  extended by com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration
      extended by com.xpn.xwiki.store.migration.hibernate.R35102XWIKI7771DataMigration
All Implemented Interfaces:
DataMigration, HibernateDataMigration

@Component
@Named(value="R35102XWIKI7771")
@Singleton
public class R35102XWIKI7771DataMigration
extends AbstractHibernateDataMigration

Migration for XWIKI-7771: Fix the LOBs wrongly created by the 3.2-3.5 mapping files for PostgreSQL.

Since:
3.5.1
Version:
$Id: 394d9dae775def2031d274766eca5507ffaf7654 $

Field Summary
 
Fields inherited from class com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration
componentManager
 
Constructor Summary
R35102XWIKI7771DataMigration()
           
 
Method Summary
 String getDescription()
           
 XWikiDBVersion getVersion()
           
 void hibernateMigrate()
          Execute the migration itself.
 boolean shouldExecute(XWikiDBVersion startupVersion)
           
 
Methods inherited from class com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration
getLiquibaseChangeLog, getName, getPreHibernateLiquibaseChangeLog, getStore, getXWikiContext, migrate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

R35102XWIKI7771DataMigration

public R35102XWIKI7771DataMigration()
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).

shouldExecute

public boolean shouldExecute(XWikiDBVersion startupVersion)
Specified by:
shouldExecute in interface DataMigration
Overrides:
shouldExecute in class AbstractHibernateDataMigration
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

hibernateMigrate

public void hibernateMigrate()
                      throws DataMigrationException,
                             XWikiException
Description copied from class: AbstractHibernateDataMigration
Execute the migration itself.

Specified by:
hibernateMigrate in class AbstractHibernateDataMigration
Throws:
DataMigrationException - on migration error.
XWikiException - on error from the store.


Copyright © 2004–2014 XWiki. All rights reserved.