hi, after update from 1.0.1 to 1.0.2 whith composer and run drush updb not update and show this error.
my drupal version 10.3.2
my php version 8.2
error message ;
> [notice] Update started: commerce_product_limits_update_9001
> [error] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbcpxutrdhszcp.commerce_product_variation__a0efc6189a' doesn't exist: ALTER TABLE commerce_product_variation__a0efc6189a MODIFY minimum_order_quantity_value INT(10) UNSIGNED NOT NULL; Array
> (
> )
>
> [error] Update failed: commerce_product_limits_update_9001
[error] Update aborted by: commerce_product_limits_update_9001
[error] Finished performing updates.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | commerce-product-limits-9001-update-fails-3469723-17.patch | 1.28 KB | rokkay |
Issue fork commerce_product_limits-3469723
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 1.0.x
compare
- 3469723-commerceproductlimitsupdate9001
changes, plain diff MR !5
Comments
Comment #3
jsacksick commentedTry updating to 1.0.3 and please report back if the issue is fixed, but that does seem to indicate a problem with your installation.
Comment #4
bolaghi commentedi updated to 1.0.3 . problem not solved.
Comment #5
jsacksick commentedI'm supposed to be checking if the table exists... So not sure what else I can do there, I tested the update hook on my install prior to committing it, and I didn't encounter issue... Is the error message similar?
Comment #6
bolaghi commentederror after update to 1.0.3 ;
> [notice] Update started: commerce_product_limits_update_9001
> [error] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbcpxutrdhszcp.commerce_product_variation__a0efc6189a' doesn't exist: ALTER TABLE commerce_product_variation__a0efc6189a MODIFY minimum_order_quantity_value INT(10) UNSIGNED NOT NULL; Array
> (
> )
>
> [error] Update failed: commerce_product_limits_update_9001
[error] Update aborted by: commerce_product_limits_update_9001
[error] Finished performing updates.
Comment #7
bolaghi commentedupdate from 1.0.1 to 1.0.2 ;
~/public_html$ composer update drupal/commerce_product_limits -W
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 2 updates, 0 removals
- Upgrading drupal/commerce_product_limits (1.0.1 => 1.0.2)
- Upgrading psr/log (3.0.0 => 3.0.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 2 updates, 0 removals
- Downloading psr/log (3.0.1)
- Downloading drupal/commerce_product_limits (1.0.2)
- Upgrading psr/log (3.0.0 => 3.0.1): Extracting archive
- Upgrading drupal/commerce_product_limits (1.0.1 => 1.0.2): Extracting archive
Generating autoload files
Comment #8
bolaghi commentedupdate from 1.0.2 to 1.0.3 ;
~/public_html$ composer update drupal/commerce_product_limits -W
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
- Upgrading drupal/commerce_product_limits (1.0.2 => 1.0.3)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Downloading drupal/commerce_product_limits (1.0.3)
- Upgrading drupal/commerce_product_limits (1.0.2 => 1.0.3): Extracting archive
Generating autoload files
Comment #9
jsacksick commentedDid you check the DB to see if that table exists?
Worst case scenario you can stay on 1.0.1 for now... just hardcode the version in composer.json until you figure out what is wrong with your install.
Comment #10
bolaghi commentedafter downgrade to 1.0.1 problem is solved.
Comment #11
ckngEncounter same issue in DB update.
1.0.1 - no issues.
1.0.2 - DB update error.
The DB table table
There are negative values inside the maximum_order_quantity_value column. So UNSIGNED is causing the problem.
Comment #12
jsacksick commentedHm... What is the usecase for a negative allowed quantity? How is that supposed to work?
Comment #13
ckngGood question, let me run that through client.
Comment #14
ckngLooks like there shouldn't be any negative value here, changed to zero will allow the DB update.
Comment #16
rokkayMy issue was caused by PostgreSQL-specific syntax, which was incompatible with other database types. To resolve this, I refactored the code to use Drupal's Database API, ensuring compatibility across multiple database servers. After making this change, the update ran successfully without any further issues.
Comment #17
rokkayHere's the patch
Comment #19
jsacksick commented@rokkay: Thank you for this, slightly adapted your changes and committed them! Marking this as fixed...