From 31eac0a761deeb1d77b5e77538b7934c2bca50ac Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 25 Mar 2021 21:55:35 +1100 Subject: [PATCH] Refactoring subscriptions --- ...21_03_25_082025_refactor_billing_scriptions_table.php | 9 +++++++++ tests/Feature/SubscriptionApiTest.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/database/migrations/2021_03_25_082025_refactor_billing_scriptions_table.php b/database/migrations/2021_03_25_082025_refactor_billing_scriptions_table.php index 67a74f1f45ee..c982bb2f0eaa 100644 --- a/database/migrations/2021_03_25_082025_refactor_billing_scriptions_table.php +++ b/database/migrations/2021_03_25_082025_refactor_billing_scriptions_table.php @@ -15,6 +15,15 @@ class RefactorBillingScriptionsTable extends Migration { Schema::rename('billing_subscriptions', 'subscriptions'); + Schema::table('subscriptions', function (Blueprint $table) { + $table->text('product_id')->change(); + $table->text('recurring_product_ids'); + }); + + Schema::table('subscriptions', function (Blueprint $table) { + $table->renameColumn('product_id', 'product_ids'); + }); + } /** diff --git a/tests/Feature/SubscriptionApiTest.php b/tests/Feature/SubscriptionApiTest.php index c09e3c13c424..49ca0d007987 100644 --- a/tests/Feature/SubscriptionApiTest.php +++ b/tests/Feature/SubscriptionApiTest.php @@ -63,7 +63,7 @@ class SubscriptionApiTest extends TestCase 'X-API-TOKEN' => $this->token, ])->get('/api/v1/subscriptions/' . $this->encodePrimaryKey($billing_subscription->id)); - nlog($response); + // nlog($response); $response->assertStatus(200); }