Wiki source code of Database Upgrade

Last modified by Vincent Massol on 2017/09/06

Show last authors
1 Note that the database schema is automatically upgraded when needed. All you need to do is to ensure your ##xwiki.cfg## file is correctly configured to perform the migration. Here's a relevant excerpt from the ##xwiki.cfg## file:
2
3 {{code language="none"}}
4 #-# Whether migrations are enabled or not. Should be enabled when upgrading, but for a better startup time it is better to
5 #-# disable them in production.
6 xwiki.store.migration=1
7
8 #-# Whether to exit after migration. Useful when a server should handle migrations for a large database, without going
9 #-# live afterwards.
10 # xwiki.store.migration.exitAfterEnd=0
11
12 #-# Indicate the list of databases to migrate.
13 #-# to upgrade all wikis database set xwiki.store.migration.databases=all
14 #-# to upgrade just some wikis databases set xwiki.store.migration.databases=xwiki,wiki1,wiki2
15 #-# Note: the main wiki is always migrated whatever the configuration.
16 # xwiki.store.migration.databases=
17 {{/code}}
18
19 {{warning}}
20 From a failed migration the database tables **DATABASECHANGELOG** and **DATABASECHANGELOGLOCK** may be left over.
21 Ensure that these tables are dropped before restarting a failed migration.
22 {{/warning}}

Get Connected