This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-803c1dbc-1ea3-4f6d-9e4b-a0aabcfea82c XWIKI-25298 Open

Refuse to use a database migrated by a more recent version of XWiki

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-4663dff6-a6eb-44a8-aa9a-866ee7f0a5ca Claude created this issue on 14/Oct/26 19:41
 
Summary: Refuse to use a database migrated by a more recent version of XWiki
Issue Type: cid:jira-generated-image-avatar-803c1dbc-1ea3-4f6d-9e4b-a0aabcfea82c Improvement
Affects Versions: 18.8.0
Assignee: Unassigned
Components: Old Core
Created: 14/Oct/26 19:41
Labels: cluster
Priority: cid:jira-generated-image-static-major-94b05059-97c5-4fa9-9afe-b89e9306d2f3 Major
Reporter: Claude
Description:

XWiki refuses to use a database which needs a migration, but nothing stops an older version of XWiki from using a database migrated by a more recent version: after a downgrade, a rollback of a deployment, or when a cluster member still running the previous version starts after another member migrated the database. With migrations enabled the older version even runs its Hibernate schema update on it, which can bring back what the newer version changed, and it reads and writes data that may be in a format it does not know.
Proposal: refuse a wiki database whose version is higher than the latest data migration version known by the running XWiki, with an error explaining that it was migrated by a more recent version and that a downgrade requires a new installation and a XAR import. The existing xwiki.store.migration.version property of xwiki.cfg forces the version and thus allows using such a database at one's own risk. Note: data migrations provided by installed extensions count too, so the cluster members need the same extensions.