XF 1.4 Upgrading Failure to Latest Version

SurferJon

Active member
Hi, I get this error when upgrading my old XenForo 1.4.6 installation to the latest version.

First I tried using the command line upgrade and got this immediately:

Code:
Current version: 1040670 Upgrade target: 2010670 (2.1.6) Are you sure you want to continue with the upgrade? [y/n] y Running upgrade to 1.4.7, step 1... In Statement.php line 35:   [E_WARNING] mysqli::prepare(): MySQL server has gone away xf:upgrade [--skip-statistics]

Then I tried the web upgrade, and after an hour or so got this:
Code:
XF\Db\DuplicateKeyException: xf_liked_content: MySQL query error [1062]: Duplicate entry 'post-2786120-19513' for key 'content_type_id_user_id' in src/XF/Db/AbstractStatement.php at line 228

    XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
    XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 77
    XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
    XF\Db\AbstractAdapter->query() in src/XF/Db/Schema/AbstractDdl.php at line 151
    XF\Db\Schema\AbstractDdl->apply() in src/XF/Db/SchemaManager.php at line 149
    XF\Db\SchemaManager->alterTable() in src/XF/Install/InstallHelperTrait.php at line 594
    XF\Install\Upgrade\AbstractUpgrade->alterTable() in src/XF/Install/Upgrade/2010010-210a.php at line 574
    XF\Install\Upgrade\Version2010010->step33() in src/XF/Install/Controller/Upgrade.php at line 173
    XF\Install\Controller\Upgrade->actionRun() in src/XF/Mvc/Dispatcher.php at line 350
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 261
    XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2184
    XF\App->run() in src/XF.php at line 391
    XF::runApp() in install/index.php at line 14

Any help would be appreciated, thank you! :)
 
I managed to get the command line to run, but it failed here:

Code:
Running upgrade to 2.1.0 Alpha, step 28... done.
Running upgrade to 2.1.0 Alpha, step 29... done.
Running upgrade to 2.1.0 Alpha, step 30... done.
Running upgrade to 2.1.0 Alpha, step 31... done.
Running upgrade to 2.1.0 Alpha, step 32... done.
Running upgrade to 2.1.0 Alpha, step 33...
In AbstractStatement.php line 228:

  xf_liked_content: MySQL query error [1062]: Duplicate entry 'post-2786120-1
  9513' for key 'content_type_id_user_id'


xf:upgrade [--skip-statistics]

Exception query:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
  ALTER TABLE `xf_liked_content`
RENAME TO `xf_reaction_content`,
CHANGE COLUMN `like_id` `reaction_content_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
CHANGE COLUMN `like_user_id` `reaction_user_id` INT UNSIGNED NOT NULL,
CHANGE COLUMN `like_date` `reaction_date` INT UNSIGNED NOT NULL,
ADD `reaction_id` INT UNSIGNED NOT NULL DEFAULT '1' AFTER `reaction_content_id`,
ADD UNIQUE KEY `content_type_id_user_id` (`content_type`, `content_id`, `reaction_user_id`),
ADD KEY `content_type_id_reaction_date` (`content_type`, `content_id`, `reaction_date`),
ADD KEY `content_user_id_reaction_date` (`content_user_id`, `reaction_date`),
ADD KEY `reaction_date` (`reaction_date`)
 
Back
Top Bottom