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

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

@Component
@Named(value="R7345XWIKI2079")
@Singleton
public class R7350XWIKI2079DataMigration
extends AbstractHibernateDataMigration

Migration for XWIKI2079: When migrating the document archive format from 1.0 or before to 1.2, delete the old XWD_ARCHIVE field, as it will prevent saving documents, since that column used to have a NOT NULL constraint. Also, Hibernate does not delete columns/tables that don't appear in the mapping file, so the column must be manually dropped.

Since:
1.3M2, 1.2.2
Version:
$Id: dcf6908acebed5d991e99a97012f108990a13e0d $

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

Constructor Detail

R7350XWIKI2079DataMigration

public R7350XWIKI2079DataMigration()
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

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-2013 XWiki. All Rights Reserved.