- Issue created by @Grimreaper
Hi,
I am trying to update from commerce_stripe 8.x-1.1 to 8.x-1.2 and I got the following fatal error on commerce_stripe_update_8103 update:
[notice] Update started: commerce_stripe_update_8103
> [error] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'commerce_payment_method__card_exp_month.entity_id' in 'WHERE': DELETE FROM "PREFIX_commerce_payment_method__card_exp_month" WHERE bundle = 'credit_card' and EXISTS (SELECT * FROM "PREFIX_commerce_payment_method" WHERE commerce_payment_method__card_exp_month.entity_id = commerce_payment_method.method_id and commerce_payment_method.type = 'stripe_card'); Array
I changed my actual database prefix by PREFIX in the copy/pasted error.
I think direct database queries like:
$database->query("INSERT INTO {commerce_payment_method__stripe_card_exp_month} SELECT * FROM {commerce_payment_method__card_exp_month} cem WHERE cem.bundle = 'credit_card' and EXISTS (SELECT * FROM {commerce_payment_method} pm WHERE cem.entity_id = pm.method_id and pm.type = 'stripe_card') and NOT EXISTS (SELECT * FROM {commerce_payment_method__stripe_card_exp_month} scem2 WHERE cem.entity_id = scem2.entity_id);");
do not handle database prefix.
Install commerce_stripe 8.x-1.1 on a website with a database prefix. Update to 8.x-1.2.
Rewrite the update code to use database insert/update/delete methods with abstraction layer.
Active
1.2
Code