Package com.xpn.xwiki.store.migration
Class XWikiDBVersion
- java.lang.Object
-
- com.xpn.xwiki.store.migration.XWikiDBVersion
-
- All Implemented Interfaces:
Comparable<XWikiDBVersion>
public class XWikiDBVersion extends Object implements Comparable<XWikiDBVersion>
Stores XWiki's data version in the database. Used to find out which migrations to execute based on the current data version in the Database (each migration says which minimal version it requires to execute).The version scheme in the past was to use the SVN revision number of the commit of the migrator but since we've now moved to Git we're now using an integer matching the current XWiki version and allowing for a range of 1000 migrations. So if you're writing the first migrator for version 5.2 of XWiki then the version will be 52000. If you're writing the 2nd migration for XWiki 5.2 then its version would be 52001, etc.
- Version:
- $Id: f7d837eee58ca94c8e3f0888aa71fddda058689c $
-
-
Constructor Summary
Constructors Constructor Description XWikiDBVersion()
Default constructor.XWikiDBVersion(int version)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(XWikiDBVersion o)
int
getVersion()
XWikiDBVersion
increment()
protected void
setVersion(int version)
String
toString()
-
-
-
Method Detail
-
getVersion
public int getVersion()
- Returns:
- data version
-
setVersion
protected void setVersion(int version)
- Parameters:
version
- - data version
-
compareTo
public int compareTo(XWikiDBVersion o)
- Specified by:
compareTo
in interfaceComparable<XWikiDBVersion>
-
increment
public XWikiDBVersion increment()
- Returns:
- next version
-
-