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.
Attachments
Issue Links
- depends on
-
XWIKI-25299 Allow running the database migrations and the Distribution Wizard at startup and then stopping XWiki
-
- Open
-
- relates to
-
XWIKI-25297 Prevent several cluster members from migrating the database at the same time
-
- Open
-