From 79e525d53fb70f8ac1719ef3d73cfae0bb4a9ea3 Mon Sep 17 00:00:00 2001 From: Konstantinos Arvanitakis Date: Thu, 3 Sep 2026 17:31:39 +0300 Subject: [PATCH] Fix: Stripe Intents Table is a Lunar Table, so needs a prefix. This is covered by the Lunar\Base\Migration --- ...002_add_context_to_stripe_payment_intents.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/database/migrations/2026_09_03_000002_add_context_to_stripe_payment_intents.php b/database/migrations/2026_09_03_000002_add_context_to_stripe_payment_intents.php index 4fb9360..06a5421 100644 --- a/database/migrations/2026_09_03_000002_add_context_to_stripe_payment_intents.php +++ b/database/migrations/2026_09_03_000002_add_context_to_stripe_payment_intents.php @@ -1,8 +1,8 @@ prefix + * resolves the SAME table-prefix config every Lunar-owned table uses + * (config('lunar.database.table_prefix')) — the vendor migration that + * creates this table (lunarphp/stripe's create_stripe_payment_intents_table) + * already does this, so a store running with a non-default prefix (this + * one runs with 'lunar_') would otherwise have this migration fail against + * a table name that doesn't exist. */ return new class extends Migration { public function up(): void { - Schema::table('stripe_payment_intents', function (Blueprint $table) { + Schema::table($this->prefix.'stripe_payment_intents', function (Blueprint $table) { $table->json('context')->nullable()->after('status'); $table->string('payment_type')->nullable()->after('context'); }); @@ -32,8 +40,8 @@ return new class extends Migration public function down(): void { - Schema::table('stripe_payment_intents', function (Blueprint $table) { + Schema::table($this->prefix.'stripe_payment_intents', function (Blueprint $table) { $table->dropColumn(['context', 'payment_type']); }); } -}; \ No newline at end of file +};