I updated from 2.4.5 to 2.4.8-2 without any error. But at try update to 3.0.2 I always have the same problem:
DB Error: Unknown column 'ig.views' in 'field list'
Stack Trace:
File: /Users/glaucorobertomunsbergdossantos/Sites/revistas/classes/install/Upgrade.inc.php line 632
Function: DAO->update("INSERT INTO metrics (file_type, load_id, metric_type, assoc_type...", Array(8), False)
File: (unknown) line (unknown)
Function: Upgrade->migrateDefaultUsageStatistics(Object(Upgrade), Array(2))
File: /Users/glaucorobertomunsbergdossantos/Sites/revistas/lib/pkp/classes/install/Installer.inc.php line 415
Function: call_user_func(Array(2), Object(Upgrade), Array(2))
File: /Users/glaucorobertomunsbergdossantos/Sites/revistas/lib/pkp/classes/install/Installer.inc.php line 265
Function: Installer->executeAction(Array(3))
File: /Users/glaucorobertomunsbergdossantos/Sites/revistas/lib/pkp/classes/install/Installer.inc.php line 186
Function: Installer->executeInstaller()
File: /Users/glaucorobertomunsbergdossantos/Sites/revistas/lib/pkp/classes/install/form/UpgradeForm.inc.php line 40
Function: Installer->execute()
File: /Users/glaucorobertomunsbergdossantos/Sites/revistas/lib/pkp/pages/install/InstallHandler.inc.php line 110
Function: UpgradeForm->execute()
File: (unknown) line (unknown)
Function: InstallHandler->installUpgrade(Array(0), Object(Request))
File: /Users/glaucorobertomunsbergdossantos/Sites/revistas/lib/pkp/classes/core/PKPRouter.inc.php line 372
Function: call_user_func(Array(2), Array(0), Object(Request))
File: /Users/glaucorobertomunsbergdossantos/Sites/revistas/lib/pkp/classes/core/PKPPageRouter.inc.php line 239
Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(0), False)
File: /Users/glaucorobertomunsbergdossantos/Sites/revistas/lib/pkp/classes/core/Dispatcher.inc.php line 134
Function: PKPPageRouter->route(Object(Request))
File: /Users/glaucorobertomunsbergdossantos/Sites/revistas/lib/pkp/classes/core/PKPApplication.inc.php line 227
Function: Dispatcher->dispatch(Object(Request))
File: /Users/glaucorobertomunsbergdossantos/Sites/revistas/index.php line 68
Function: PKPApplication->execute()
Looking the issue opened by other user I can see that is not the same problem, but display similar message. I have the problem at metrics table and the other user in article_galleys. @asmecher can you help me?
Hmmm…
The function migrateDefaultUsageStatistics should only be executed if the DB table article_galleys_stats_migration exists, s. ojs/upgrade.xml at ojs-3_1_1-0 · pkp/ojs · GitHub.
The DB table article_galleys_stats_migration is created in the script 2.4.0_preupdate_usageStatistics.xml, that should be executed only if the DB table issue_galleys has the column views. This is for those who are upgrading from OJS < 2.4.3.
Thus, if your 2.4.8.3 DB does not have the column views in the DB table issue_galleys, the script 2.4.0_preupdate_usageStatistics.xml is not executed during your upgrade. But, apparently you have the DB table article_galleys_stats_migration – it seems like that DB table stayed in your OJS 2.4.8.3 DB from an earlier upgrade? – so that the function migrateDefaultUsageStatistics is wrongly executed – it should not be executed, and the DB table article_galleys_stats_migration should not be there.
When did you do the upgrade from an OJS < 2.4.3?
Hmmm… You started the upgread on a clean OJS 2.4.8 DB backup with the removed DB “article_galleys_stats_migration” i.e. not on a DB that you have already executed the upgrade on, correct? – just to double check…
Hello @bozana,
the column edit_decisions.article_id exists in the original 2.4.8.3 database. It does not exist anymore when the error is shown during the upgrade.
Hmmm… @GustavoTonini, but you do not have the table “article_galleys_migration” after trying the upgrade, correct?
If so, it seems like this SQL from ojs/upgrade.xml at ojs-3_1_1-0 · pkp/ojs · GitHub could not be executed successfully for you for some reason: CREATE TABLE article_galleys_migration AS (SELECT galley_id, file_id, style_file_id FROM article_galleys)
After that script there should be the new DB table “article_galleys_migration”.
Could you maybe try to do it manually as the user configured in your config.inc.php? – Hmmm… :-\ At the moment I have no idea why this should not work well… Hmmm… :-\