Hi Alec,
Thanks for checking it out. I don’t know if I should start a new post or keep the new issues in here ( you let me know). I’ve followed your suggestion to do the upgrade from 3.1.2-4 to 3.3.0-5.
Here are my steps:
- Drop my current testing DB-3.2.1-4
- Created an empty DB with this SQL query
%CREATE DATABASE mytestDB CHARACTER SET utf8 collate utf8_general_ci;
- Restore my good working backup DB-3.1.2-4.
- Restore my good working backup of “spool/files” data.
- Extracted a new source code version 3.3.0-5.
- Modified the config.inc.php file and changed all permission.
The migration failed halfway with many errors. Please see below.
- Ran the upgrade command: % PHP tools/upgrade upgrade
It failed halfway and came out with many errors. Please see below
=========
[pre-install]
[load: upgrade.xml]
[version: 3.3.0.5]
[code: Installer Installer::checkPhpVersion]
[code: Installer Installer::migrateSubmissionCoverImages]
[data: dbscripts/xml/upgrade/3.2.0_preupdate_email_templates.xml]
[data: dbscripts/xml/upgrade/3.2.0_preupdate_versioning_articleGalleySettings.xml (skipped)]
[data: dbscripts/xml/upgrade/3.2.0_preupdate_versioning.xml]
[data: dbscripts/xml/upgrade/3.2.0_preupdate_last_activity.xml]
[schema: lib/pkp/xml/schema/common.xml]
[schema: lib/pkp/xml/schema/log.xml]
[schema: lib/pkp/xml/schema/announcements.xml]
[schema: lib/pkp/xml/schema/scheduledTasks.xml]
[schema: lib/pkp/xml/schema/temporaryFiles.xml]
[schema: lib/pkp/xml/schema/metadata.xml]
[schema: lib/pkp/xml/schema/reviews.xml]
[schema: lib/pkp/xml/schema/reviewForms.xml]
[schema: lib/pkp/xml/schema/controlledVocab.xml]
[schema: lib/pkp/xml/schema/submissions.xml]
[schema: lib/pkp/xml/schema/submissionFiles.xml]
[schema: lib/pkp/xml/schema/categories.xml]
[schema: lib/pkp/xml/schema/notes.xml]
[schema: lib/pkp/xml/schema/genres.xml]
[schema: lib/pkp/xml/schema/tombstone.xml]
[schema: lib/pkp/xml/schema/rolesAndUserGroups.xml]
[schema: lib/pkp/xml/schema/metrics.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/libraryFiles.xml]
[schema: lib/pkp/xml/schema/navigationMenus.xml]
[schema: dbscripts/xml/ojs_schema.xml]
[code: Installer Installer::installDefaultNavigationMenus]
WARNING: The NavigationMenu (ContextId: 1, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
WARNING: The NavigationMenu (ContextId: 1, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.
WARNING: The NavigationMenu (ContextId: 2, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
WARNING: The NavigationMenu (ContextId: 2, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.
WARNING: The NavigationMenu (ContextId: 0, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
[code: Installer Installer::migrateStaticPagesToNavigationMenuItems]
[code: Installer Installer::migrateUserAndAuthorNames (skipped)]
[data: dbscripts/xml/upgrade/3.2.0_stylesheet.xml]
[data: dbscripts/xml/upgrade/3.2.0_archiving_settings.xml]
[data: dbscripts/xml/upgrade/3.2.0_update.xml]
[data: dbscripts/xml/upgrade/3.2.0_navigation_menu_items_locale_change.xml]
[code: Installer Installer::migrateSiteLocales]
[code: Installer Installer::migrateSidebarBlocks]
[code: Installer Installer::migrateSiteStylesheet]
[code: Installer Installer::migrateMetadataSettings]
[code: Installer Installer::createLicenseTerms]
[code: Installer Installer::installEmailTemplate]
[code: Installer Installer::changeUserRolesAndStageAssignmentsForStagePermitSubmissionEdit]
[data: dbscripts/xml/upgrade/3.2.0_versioning.xml]
[data: dbscripts/xml/upgrade/3.2.0_versioning_submissionCategories.xml]
[data: dbscripts/xml/upgrade/3.2.0_last_activity.xml]
[data: dbscripts/xml/upgrade/3.2.0_url_path.xml]
[code: Installer Installer::setStatsEmailSettings]
[code: Installer Installer::fixLibraryFiles]
[code: Installer Installer::installEmailTemplate]
[note: docs/release-notes/README-3.2.0]
[data: dbscripts/xml/upgrade/3.2.1_update.xml]
[code: Installer Installer::installEmailTemplate]
[migration: PKPv3_2_1SubeditorCategoriesMigration]
[note: docs/release-notes/README-3.2.1]
[migration: PKPv3_3_0UpgradeMigration]
A submission file was expected but not found at journals/1/articles/1/submission/proof/1-12-2-1-10-20090602.doc.
…
…
…
A submission file was expected but not found at journals/1/articles/534/submission/534-1-3685-1-2-20191121.txt.
A submission file was expected but not found at journals/1/articles/534/submission/534-1-3685-2-2-20191121.txt.
A submission file was expected but not found at journals/1/articles/534/submission/534-1-3687-1-2-20191121.txt.
A submission file was expected but not found at journals/1/articles/599/submission/599-12-4288-1-2-20201006.doc.
ERROR: Upgrade failed: DB: PDOException: SQLSTATE[HY000]: General error: 1005 Can’t create table ‘testdb.#sql-469_10337’ (errno: 150) in /var/www/testdb/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:115
Stack trace:
#0 /var/www/testdb/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(115): PDOStatement->execute(NULL)
#1 /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(464): Doctrine\DBAL\Driver\PDOStatement->execute()
#2 /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\Database\Connection->Illuminate\Database{closure}(‘alter table `re…’, Array)
#3 /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback(‘alter table `re…’, Array, Object(Closure))
#4 /opt/rh/httpd24/root/var/www/jeunesse/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(465): Illuminate\Database\Connection->run(‘alter table `re…’, Array, Object(Closure))
#5 /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(102): Illuminate\Database\Connection->statement(‘alter table `re…’)
#6 /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(290): Illuminate\Database\Schema\Blueprint->build(Object(Illuminate\Database\MySqlConnection), Object(Illuminate\Database\Schema\Grammars\MySqlGrammar))
#7 /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(151): Illuminate\Database\Schema\Builder->build(Object(Illuminate\Database\Schema\Blueprint))
#8 /var/www/testdb/lib/pkp/classes/migration/upgrade/PKPv3_3_0UpgradeMigration.inc.php(538): Illuminate\Database\Schema\Builder->table(‘review_round_fi…’, Object(Closure))
#9 /var/www/testdb/lib/pkp/classes/migration/upgrade/PKPv3_3_0UpgradeMigration.inc.php(141): PKPv3_3_0UpgradeMigration->_migrateSubmissionFiles()
#10 /opt/rh/httpd24/root/var/www/jeunesse/lib/pkp/classes/install/Installer.inc.php(405): PKPv3_3_0UpgradeMigration->up()
#11 /var/www/testdb/lib/pkp/classes/install/Installer.inc.php(251): Installer->executeAction(Array)
#12 /var/www/testdb/lib/pkp/classes/install/Installer.inc.php(174): Installer->executeInstaller()
#13 /var/www/testdb/lib/pkp/classes/cliTool/UpgradeTool.inc.php(89): Installer->execute()
#14 /var/www/testdb/lib/pkp/classes/cliTool/UpgradeTool.inc.php(65): UpgradeTool->upgrade()
#15 /var/www/testdb/tools/upgrade.php(22): UpgradeTool->execute()
#16 {main}
Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[HY000]: General error: 1005 Can’t create table ‘jeunesse.#sql-469_10337’ (errno: 150) in /var/www/testdb/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18
Stack trace:
#0 /var/www/testdb/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(117): Doctrine\DBAL\Driver\PDO\Exception::new(Object(PDOException))
#1 /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(464): Doctrine\DBAL\Driver\PDOStatement->execute()
#2 /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\Database\Connection->Illuminate\Database{closure}(‘alter table `re…’, Array)
#3 /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback(‘alter table `re…’, Array, Object(Closure))
#4 /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(465): Illuminate\Database\Connection->run(‘alter table `re…’, Array, Object(Closure))
#5 /var/www/jeunesse/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(102): Illuminate\Database\Connection->statement(‘alter table `re…’)
#6 /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(290): Illuminate\Database\Schema\Blueprint->build(Object(Illuminate\Database\MySqlConnection), Object(Illuminate\Database\Schema\Grammars\MySqlGrammar))
#7 /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(151): Illuminate\Database\Schema\Builder->build(Object(Illuminate\Database\Schema\Blueprint))
#8 /var/www/testdb/lib/pkp/classes/migration/upgrade/PKPv3_3_0UpgradeMigration.inc.php(538): Illuminate\Database\Schema\Builder->table(‘review_round_fi…’, Object(Closure))
#9 /var/www/testdb/lib/pkp/classes/migration/upgrade/PKPv3_3_0UpgradeMigration.inc.php(141): PKPv3_3_0UpgradeMigration->_migrateSubmissionFiles()
#10 /var/www/testdb/lib/pkp/classes/install/Installer.inc.php(405): PKPv3_3_0UpgradeMigration->up()
#11 /var/www/testdb/lib/pkp/classes/install/Installer.inc.php(251): Installer->executeAction(Array)
#12 /var/www/testdb/lib/pkp/classes/install/Installer.inc.php(174): Installer->executeInstaller()
#13 /var/www/testdb/lib/pkp/classes/cliTool/UpgradeTool.inc.php(89): Installer->execute()
#14 /var/www/testdb/lib/pkp/classes/cliTool/UpgradeTool.inc.php(65): UpgradeTool->upgrade()
#15 /var/www/testdb/tools/upgrade.php(22): UpgradeTool->execute()
#16 {main}
Next Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1005 Can’t create table ‘testdb.#sql-469_10337’ (errno: 150) (SQL: alter table review_round_files
add constraint review_round_files_submission_file_id_foreign
foreign key (submission_file_id
) references submission_files
(submission_file_id
)) in /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php:671
Stack trace:
#0 /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback(‘alter table `re…’, Array, Object(Closure))
#1 /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(465): Illuminate\Database\Connection->run(‘alter table `re…’, Array, Object(Closure))
#2 /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(102): Illuminate\Database\Connection->statement(‘alter table `re…’)
#3 /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(290): Illuminate\Database\Schema\Blueprint->build(Object(Illuminate\Database\MySqlConnection), Object(Illuminate\Database\Schema\Grammars\MySqlGrammar))
#4 /var/www/testdb/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(151): Illuminate\Database\Schema\Builder->build(Object(Illuminate\Database\Schema\Blueprint))
#5 /var/www/testdb/lib/pkp/classes/migration/upgrade/PKPv3_3_0UpgradeMigration.inc.php(538): Illuminate\Database\Schema\Builder->table(‘review_round_fi…’, Object(Closure))
#6 /var/www/testdb/lib/pkp/classes/migration/upgrade/PKPv3_3_0UpgradeMigration.inc.php(141): PKPv3_3_0UpgradeMigration->_migrateSubmissionFiles()
#7 /var/www/testdb/lib/pkp/classes/install/Installer.inc.php(405): PKPv3_3_0UpgradeMigration->up()
#8 /var/www/testdb/pkp/classes/install/Installer.inc.php(251): Installer->executeAction(Array)
#9 /var/www/testdb/lib/pkp/classes/install/Installer.inc.php(174): Installer->executeInstaller()
#10 /var/www/testdb/lib/pkp/classes/cliTool/UpgradeTool.inc.php(89): Installer->execute()
#11 /var/www/testdb/lib/pkp/classes/cliTool/UpgradeTool.inc.php(65): UpgradeTool->upgrade()
#12 /var/www/testdb/tools/upgrade.php(22): UpgradeTool->execute()
#13 {main}
====================
any suggestions are appreciated !!
-ptran