Okay, by reviewing your log, I found out what happened.
In 4.1.3 on XF 2, there is an upgrade step that cleans up a problem during fresh installations that used the 4.1.1 upgrade script, which is the version where vw_ tables were renamed to xf_vw_ in XF 2. Apparently, in some versions of the 4.1.1 install script, it actually created both vw_ and xf_vw_ tables for many tables, rather than only the xf_vw_ variant. In the 4.1.3 upgrade, it tried to resolve this by just removing tables that still matches the old naming pattern if there was a matching table using the new pattern.
But 4.1.3 did not consider that the vw_patchinfo table needed to be excluded if its upgrade script was also being run during the middle of an unfinished upgrade from XF 1.x (only safe to do after the XF 1.x upgrade), because it is actually normal (and necessary, as you've found) to have 2 copies of this table in that case. The reason why vw_patchinfo exists even after this is because the table recreates itself whenever patch data is logged.
In order to resolve the issue, you basically just need to copy all the data from xf_vw_patchinfo back into vw_patchinfo.
Code:
INSERT IGNORE INTO vw_patchinfo
SELECT `version`, `label`
FROM xf_vw_patchinfo
This is the opposite of a query I asked you to run earlier.
After doing this, the upgrade should proceed to the end.
This issue will be resolved in the next patch release. If you run the upgrade again before then, you should edit
src/addons/vw/vw/_install/lib/upgradepath/steps/4/1/3/C/xf2.php. Find:
Code:
if ($schema->tableExists('xf_' . $table) AND $schema->tableExists($table))
Replace with:
Code:
if ($table != 'vw_patchinfo' AND $schema->tableExists('xf_' . $table) AND $schema->tableExists($table))
After the upgrade is complete, you can safely remove the vw_patchinfo table manually. You can test this by renaming the table first. The problem only arises when it is removed before the XF 1.x upgrade has completed.