Calendar Upgrade from xf1 to xf2.1 went south

Alpha1

Member
XF\Db\InvalidQueryException: xf_nf_calendar_event: MySQL statement prepare error [1101]: BLOB/TEXT column 'event_timezone' can't have a default value in src/XF/Db/AbstractStatement.php at line 228

  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 40
  3. XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
  4. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
  5. XF\Db\AbstractAdapter->query() in src/XF/Db/Schema/AbstractDdl.php at line 151
  6. XF\Db\Schema\AbstractDdl->apply() in src/XF/Db/SchemaManager.php at line 149
  7. XF\Db\SchemaManager->alterTable() in src/addons/NF/Calendar/Setup.php at line 35
  8. NF\Calendar\Setup->installStep1() in src/addons/NF/Calendar/Setup.php at line 404
  9. NF\Calendar\Setup->upgrade2010034Step2() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 122
  10. NF\Calendar\Setup->upgradeStepRunner() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 71
  11. NF\Calendar\Setup->upgrade() in src/XF/Admin/Controller/AddOn.php at line 576
  12. XF\Admin\Controller\AddOn->actionUpgrade() in src/XF/Mvc/Dispatcher.php at line 350
  13. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 262
  14. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
  15. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
  16. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2184
  17. XF\App->run() in src/XF.php at line 391
  18. XF::runApp() in admin.php at line 13
 
I just PM'd you a changed version. I think there has been a recent change that has altered the behaviour of that code since it hasn't been an issue before.

Essentially, the column schema had a default value in XF1 and with the XF2 upgrade, the column type was altered and the default value (and instead handled within PHP) removed. It seems for some reason, the type changed but the default value wasn't removed hence the error.
 
Back
Top