Closed satanspropaganda closed 1 month ago
Thanks, this is fixed for the next release.
Related: https://github.com/craftcms/commerce/pull/3495
To get the fix early, change your craftcms/commerce
requirement in composer.json to:
"require": {
"craftcms/commerce": "5.x-dev#000d10999732d2e8574114249f840eff962382ec as 5.0.4",
"...": "..."
}
Then run composer update
. Restore your database and run the upgrade again.
We will update this issue with notification once the release is out.
Hey @lukeholder,
I've just tested this and unfortunately even with restoring the database and trying out the newer version of the plugin, we still get the exact same issue
`*** applying m221025_083940_add_purchasables_stores_table
add column width decimal(14,4) to table {{%commerce_purchasables}} ... done (time: 0.009s) add column height decimal(14,4) to table {{%commerce_purchasables}} ... done (time: 0.010s) add column length decimal(14,4) to table {{%commerce_purchasables}} ... done (time: 0.009s) add column weight decimal(14,4) to table {{%commerce_purchasables}} ... done (time: 0.010s) add column taxCategoryId integer to table {{%commerce_purchasables}} ... done (time: 0.010s) add column shippingCategoryId integer to table {{%commerce_purchasables}} ... done (time: 0.014s) add foreign key fk_lajeofrwubjmlrvluvzubooltqevokzddqyn: {{%commerce_purchasables}} (taxCategoryId) references {{%commerce_taxcategories}} (id) ... done (time: 0.874s) add foreign key fk_jkyhofxoothrrhjbcqdszwndhkyzaiwfewtt: {{%commerce_purchasables}} (shippingCategoryId) references {{%commerce_shippingcategories}} (id) ... done (time: 0.998s) create table {{%commerce_purchasables_stores}} ...Exception: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'commerce_purchasables_stores' already exists The SQL being executed was: CREATE TABLE
commerce_purchasables_stores
(`
Thanks
It looks like your database is not a Commerce 4 database if the commerce_purchasables_stores
table exists in it before upgrade?
Can you restore your database and see if that table is in there? If it is, that is not a Commerce 4 DB backup.
What happened?
Description
When upgrading, I keep hitting migrations that fail and break the whole upgrade process with the error message "Migration failed. The rest of the migrations are canceled."
`*** applying m221025_083940_add_purchasables_stores_table
Steps to reproduce
Expected behavior
The migrations to run with no issues & the system to upgrade
Actual behavior
The whole upgrade to fail due to multiple migrations failing
Craft CMS version
5.1.3
Craft Commerce version
5.0.5
PHP version
8.3
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
-