Describe the issue or problem
When upgrading a 3.4.0.4 database to 3.5.0.0, I’m getting errors about a table invitations
that already exists.
Steps I took leading up to the issue
- executing
php tools/upgrade.php check
returns following output:Code version: 3.5.0.0 Database version: 3.4.0.4 Latest version: 3.5.0.0 Database version is older than code version Run "tools/upgrade.php upgrade" to update
- executing
php tools/upgrade.php upgrade
fails with following error:2025-07-02 15:50:28 [pre-install] 2025-07-02 15:50:28 [load: upgrade.xml] 2025-07-02 15:50:28 [version: 3.5.0.0] 2025-07-02 15:50:28 [code: Installer Installer::checkPhpVersion] 2025-07-02 15:50:28 [code: Installer Installer::installDefaultNavigationMenus] [02-Jul-2025 15:50:28 UTC] WARNING: The NavigationMenu (ContextId: 1, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached. [02-Jul-2025 15:50:28 UTC] WARNING: The NavigationMenu (ContextId: 1, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached. [02-Jul-2025 15:50:28 UTC] WARNING: The NavigationMenu (ContextId: , Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached. 2025-07-02 15:50:28 [code: Installer Installer::migrateStaticPagesToNavigationMenuItems] 2025-07-02 15:50:28 [migration: PKP\migration\upgrade\v3_4_0\I10249_FixProfileImageDataLoss] 2025-07-02 15:50:28 [migration: PKP\migration\upgrade\v3_4_0\I9627_AddUsageStatsTemporaryTablesIndexes] 2025-07-02 15:50:29 [migration: PKP\migration\upgrade\v3_4_0\I9535_FixEmptyFileStage] 2025-07-02 15:50:29 [migration: PKP\migration\upgrade\v3_4_0\I9830_FixEmptyUserLocales] 2025-07-02 15:50:29 [migration: PKP\migration\upgrade\v3_4_0\I8592_SiteNotificationSubscriptions] 2025-07-02 15:50:29 [migration: APP\migration\upgrade\v3_4_0\I9813_QuickSubmitSubmissionProgressType] 2025-07-02 15:50:29 [migration: APP\migration\upgrade\v3_5_0\I11241_MissingDecisionConstantsUpdate] 2025-07-02 15:50:29 [migration: PKP\migration\upgrade\v3_5_0\PreflightCheckMigration] 2025-07-02 15:50:29 [migration: APP\migration\upgrade\v3_5_0\I8333_AddMissingForeignKeys] 2025-07-02 15:50:33 [migration: APP\migration\upgrade\v3_5_0\I9892_FloatToDecimalColumnTypeUpdate] 2025-07-02 15:50:33 [migration: PKP\migration\upgrade\v3_5_0\I9895_AddAppKeyToConfigFile] 2025-07-02 15:50:33 [migration: PKP\migration\upgrade\v3_5_0\I9678_RemoveScheduledTasksTable] 2025-07-02 15:50:33 [migration: PKP\migration\upgrade\v3_5_0\InstallEmailTemplates] 2025-07-02 15:50:33 [migration: PKP\migration\upgrade\v3_5_0\I9197_MigrateAccessKeys] 2025-07-02 15:50:33 [revert migration: PKP\migration\upgrade\v3_5_0\InstallEmailTemplates] 2025-07-02 15:50:33 [revert migration: PKP\migration\upgrade\v3_5_0\I9678_RemoveScheduledTasksTable] 2025-07-02 15:50:33 [revert migration: PKP\migration\upgrade\v3_5_0\I9895_AddAppKeyToConfigFile] 2025-07-02 15:50:33 [revert migration: APP\migration\upgrade\v3_5_0\I9892_FloatToDecimalColumnTypeUpdate] 2025-07-02 15:50:33 [revert migration: APP\migration\upgrade\v3_5_0\I8333_AddMissingForeignKeys] 2025-07-02 15:50:33 [downgrade for "APP\migration\upgrade\v3_5_0\I8333_AddMissingForeignKeys" unsupported: Downgrade not supported] ERROR: Upgrade failed: DB: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'invitations' already exists (Connection: mysql, SQL: create table `invitations` (`invitation_id` bigint not null auto_increment primary key, `key_hash` varchar(255) null, `type` varchar(255) not null, `user_id` bigint null, `inviter_id` bigint null, `expiry_date` datetime null, `payload` json null, `status` enum('INITIALIZED', 'PENDING', 'ACCEPTED', 'DECLINED', 'CANCELLED') not null, `email` varchar(255) null comment 'When present, the email address of the invitation recipient; when null, user_id must be set and the email can be fetched from the users table.', `context_id` bigint null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')
What application are you using?
OJS 3.5.0.0