|Found errors or typos? Just edit the page or leave a message on the talk page.|
The English language documentation is canonical and most up to date.
Configuration parameter "$smwgUpgradeKey"
|Configuration parameter details:|
|Description||Sets the current database schema version|
|Default setting||See below|
|Until version||still available|
|Keyword||data store · setup · upgrade · update · internal|
$smwgUpgradeKey is an internal configuration parameter that sets the current database schema version. The configuration parameter was introduced in Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x..123
The setting to this configuration parameter verifies that a complete setup, update or upgrade using maintenance script "setupStore.php"Allows to set up the data backend/store or maintenance script "update.php" (MediaWiki.org) was done and hereby ensures a consistent database setup.
This is done by validating the status of the database by comparing the local result of the ".smw.json" file against the upgrade key. If the ".smw.json" file does not exist or contains an invalid key then the system stops before it can access any data or tables. At the same time it shows a message to the user:
Semantic MediaWiki was installed and enabled but is missing an appropriate upgrade key. Please run MediaWiki's "update.php" or Semantic MediaWiki's "setupStore.php" maintenance script first. You may consult the following pages:
Whenever a database table change occurs, the setting to this configuration parameter (
DB-YYYY-MM-DD) is changed by the programmers of extension "Semantic MediaWiki"Semantic MediaWiki (SMW) is a free, open-source extension to MediaWiki that lets you store and query data within the wiki's pages. Semantic MediaWiki is also a full-fledged framework, in conjunction with many spinoff extensions, that can turn a wiki into a powerful and flexible knowledge management system. All data created within SMW can easily be published via the Semantic Web, allowing other systems to use this data seamlessly. to reflect the requirement for the wiki administratore to follow the processes as outlined in the installation, update and upgrade manual.
Once the installer is run, the ".smw.json" file will be updated and no longer causes the exception described.
$smwgUpgradeKey => 'DB-2018-09-01'; // Key at the time of the release of SMW 3.0.0
This means that wiki instances with a different upgrade key will be noted prominently about a required database update.