From e7e1e8d097ced0c1b7a418fb4bd8ad82925c9143 Mon Sep 17 00:00:00 2001 From: Abdulbasit Rubeya Date: Sun, 27 Oct 2024 18:15:32 +0300 Subject: [PATCH 1/2] chore: reordering `subscription` comes after `plans` reordered `subscription` migration to come after the `plans` as it has a FK that refers to the `plans` migrations --- ...table.php => 2024_03_29_230313_create_subscriptions_table.php} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename wave/database/migrations/{2024_03_29_230138_create_subscriptions_table.php => 2024_03_29_230313_create_subscriptions_table.php} (100%) diff --git a/wave/database/migrations/2024_03_29_230138_create_subscriptions_table.php b/wave/database/migrations/2024_03_29_230313_create_subscriptions_table.php similarity index 100% rename from wave/database/migrations/2024_03_29_230138_create_subscriptions_table.php rename to wave/database/migrations/2024_03_29_230313_create_subscriptions_table.php From 9bb9827ef35f66d65b8b0b9837bb779866311fae Mon Sep 17 00:00:00 2001 From: Abdulbasit Rubeya Date: Sun, 27 Oct 2024 18:18:08 +0300 Subject: [PATCH 2/2] fix: data type mismatch with the `plans.id` colums --- .../migrations/2024_03_29_230313_create_subscriptions_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wave/database/migrations/2024_03_29_230313_create_subscriptions_table.php b/wave/database/migrations/2024_03_29_230313_create_subscriptions_table.php index db9984777..1c49ea576 100644 --- a/wave/database/migrations/2024_03_29_230313_create_subscriptions_table.php +++ b/wave/database/migrations/2024_03_29_230313_create_subscriptions_table.php @@ -14,7 +14,7 @@ public function up(): void Schema::create('subscriptions', function (Blueprint $table) { $table->id(); $table->morphs('billable'); - $table->unsignedBigInteger('plan_id'); + $table->unsignedInteger('plan_id'); $table->string('vendor_slug'); $table->string('vendor_product_id')->nullable(); $table->string('vendor_transaction_id')->nullable();