For this to happen, it suggests that:
1. Your database logged a completed upgrade step, but did not actually perform the same step that logs it, OR
2. Your XenForo setting values are from a later VaultWiki version than you are running (like if you cloned a pre-4.1.1 database but then imported all setting values from when you had 4.1.1 installed), OR
3. You are attempting to upgrade VaultWiki to 4.1.1 but VaultWiki is not actually installed (few or no tables exist), OR
4. You already upgraded to 4.1.1 on XenForo 1.x, and you are now running the upgrade script again after having upgraded XenForo to 2.x.
If your database error complains that x.
xf_vw_upgradelog doesn't exist, run the following database queries:
Code:
DELETE FROM vw_patchinfo
WHERE `version` = '4.1.1' AND
`label` = 'x_upgradelog'
This should rule out the first 1.
For #2, do an admin search for "vw_version_string". It should be an option called "VaultWiki version" which, based on your database state, should be no higher in value than "4.1.0". If this says "4.1.1", and this was an upgrade from XF 1.x that was actually running 4.1.1, see below.
For #4, a number of file edits will be needed. These are currently untested. In
src/addons/vw/vw/Setup.php, find:
Code:
protected function vwStopProcessing(&$result)
Replace with:
Code:
protected function vwStopProcessing(&$result, $preUpState = '0.0.0')
Find:
Code:
\vw_DB::get()->query()->replace(array(
'table' => 'vw_upgradelog',
'values' => array(
array(
'upgradetype' => "'ACT'",
\vw_DB::get()->query()->wrap('version') => "'0.0.0'"
)
)
));
Replace with (probably a scrollbar here):
Code:
$oldver = \vw_Hard_Core::model('Settings')->get('vw_version_string');
if (\vw_Hard_Core::model('Version')->compare($preUpState, '4.1.1') == -1)
{
\vw_Hard_Core::model('Settings')->set('vw_version_string', $preUpState);
}
\vw_DB::get()->query()->replace(array(
'table' => 'vw_upgradelog',
'values' => array(
array(
'upgradetype' => "'ACT'",
\vw_DB::get()->query()->wrap('version') => "'0.0.0'"
)
)
));
\vw_Hard_Core::model('Settings')->set('vw_version_string', $oldver);
Find:
Code:
if (!isset($version['X2']))
BEFORE it, add:
Find (2x):
Code:
if ($this->vwStopProcessing($result))
Replace with (2x):
Code:
if ($this->vwStopProcessing($result, $last))
More information about how this database was made would be helpful.