Open mikejpeters opened 1 day ago
Hi @mikejpeters
Thank you for your message.
I have tried to replicate this using the steps you mentioned. The one difference being I started with a fresh install of Commerce 4.
I tried both upgrading with and without dev mode enabled and both times I was able to upgrade with no issue.
Looking at the stack trace you have included it seems to be an issue related to stores when applying the project config.
Are you able to send your composer files, a DB backup (from v4) and your project config files (pre-v5 upgrade) to support@craftcms.com and reference this issue.
This way we can try to replicate it in the same scenario.
Thanks!
What happened?
Description
When upgrading to 5.x, it works the first time in the dev environment, but when running
craft up
on non-dev (i.e. staging/production) environments the migration fails with an SQL error:Steps to reproduce
composer.json
and runcomposer update
craft migrate/all
craft up
Expected behavior
Migrations should apply successfully
Actual behavior
Migrations fail because the store is attempted to be deleted but fails because of a foreign key constraint
Craft CMS version
5.4.9
Craft Commerce version
5.2.1
PHP version
8.2
Operating system and version
No response
Database type and version
MySQL 8.0.36
Image driver and version
No response
Installed plugins and versions
No response