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();