Package com.xpn.xwiki.store.migration
Interface DataMigration
-
- All Known Subinterfaces:
HibernateDataMigration
- All Known Implementing Classes:
AbstractDropNotNullDataMigration
,AbstractHibernateDataMigration
,AbstractResizeMigration
,LegacyDataMigration
,R1008010XWIKI10092DataMigration
,R1138000XWIKI16709DataMigration
,R130200000XWIKI17200DataMigration
,R140000000XWIKI19125DataMigration
,R140200000XWIKI19352DataMigration
,R140200010XWIKI19207DataMigration
,R140600000XWIKI19869DataMigration
,R15428XWIKI2977DataMigration
,R35100XWIKI7564DataMigration
,R35101XWIKI7645DataMigration
,R35102XWIKI7771DataMigration
,R40000XWIKI6990DataMigration
,R42000XWIKI7726DataMigration
,R43000XWIKI6691DataMigration
,R4340XWIKI883DataMigration
,R4359XWIKI1459DataMigration
,R54600TranslationDataMigration
,R6079XWIKI1878DataMigration
,R6405XWIKI1933DataMigration
,R72000XWIKI12153DataMigration
,R72001XWIKI12228DataMigration
,R73000XWIKI12277DataMigration
,R7350XWIKI2079DataMigration
,R90000XWIKI13474DataMigration
,R911000XWIKI14889DataMigration
,R911001XWIKI14895DataMigration
@Role public interface DataMigration
Interface for data migration. New data migration should be named using the"R"+vernum+issuenumber+"DataMigration"
format to prevent collisions. The format forvernum
isMMmmbbN
whereM
is the 0-leftpadded major (e.g. "6" is written as "06"),m
is the 0-leftpadded minor,b
is the 0-leftpadded bugfix number andN
a digit to be incremented in case we have several migrations in a given release. For example, the first migration for 10.8 would have the number1008000
.- Since:
- 3.4M1
- Version:
- $Id: 4be4b5034edc5860663ac98c0accfba3104b028c $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getDescription()
String
getName()
XWikiDBVersion
getVersion()
void
migrate()
Run migration.boolean
shouldExecute(XWikiDBVersion startupVersion)
-
-
-
Method Detail
-
getName
String getName()
- Returns:
- the data migration hint. For example "R4340XWIKI883".
-
getDescription
String getDescription()
- Returns:
- a description of what the data migration does
-
getVersion
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).
-
migrate
void migrate() throws DataMigrationException
Run migration.- Throws:
DataMigrationException
- if any error
-
shouldExecute
boolean shouldExecute(XWikiDBVersion startupVersion)
- 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
-
-