From 7d35c224f31dac59efc18f23cf22d48d5f722e37 Mon Sep 17 00:00:00 2001 From: "Fabian @ Blax Software" Date: Wed, 10 Jun 2026 11:33:09 +0200 Subject: [PATCH] fix: product_action_runs.action_id must be uuidMorphs (ProductAction is HasUuids) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit morphs('action') creates a bigint action_id, but ProductAction uses HasUuids — so ProductAction::callForProduct's run-logging dies with 'Incorrect integer value: ' on the first dispatch. uuidMorphs('action') matches the uuid key. Fresh-install fix; existing installs need an in-place widen. --- .../migrations/2025_01_01_000001_create_blax_shop_tables.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/database/migrations/2025_01_01_000001_create_blax_shop_tables.php b/database/migrations/2025_01_01_000001_create_blax_shop_tables.php index f6b58e1..aad69a3 100644 --- a/database/migrations/2025_01_01_000001_create_blax_shop_tables.php +++ b/database/migrations/2025_01_01_000001_create_blax_shop_tables.php @@ -378,7 +378,10 @@ return new class extends Migration if (!Schema::hasTable(config('shop.tables.product_action_runs', 'product_action_runs'))) { Schema::create(config('shop.tables.product_action_runs', 'product_action_runs'), function (Blueprint $table) { $table->id(); - $table->morphs('action'); + // ProductAction uses HasUuids, so action_id must be a uuid/char(36), + // not the bigint that morphs() creates — otherwise logging a run + // (callForProduct) dies with "Incorrect integer value: ''". + $table->uuidMorphs('action'); $table->uuid('product_purchase_id')->nullable(); $table->boolean('success')->default(false); $table->timestamps();