From c354179d7fef203c4cff8ea70c76edd99abf0422 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 26 Jul 2018 20:15:53 +0300 Subject: [PATCH] Make license fields nullable --- ...18_07_26_170243_fix_payment_contact_foreign_key.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/database/migrations/2018_07_26_170243_fix_payment_contact_foreign_key.php b/database/migrations/2018_07_26_170243_fix_payment_contact_foreign_key.php index e9473773e7c2..0f479705cbb2 100644 --- a/database/migrations/2018_07_26_170243_fix_payment_contact_foreign_key.php +++ b/database/migrations/2018_07_26_170243_fix_payment_contact_foreign_key.php @@ -21,6 +21,16 @@ class FixPaymentContactForeignKey extends Migration Schema::table('payments', function ($table) { $table->foreign('contact_id')->references('id')->on('contacts')->onDelete('cascade'); }); + + Schema::table('licenses', function ($table) { + $table->unsignedInteger('affiliate_id')->nullable()->change(); + $table->string('first_name')->nullable()->change(); + $table->string('last_name')->nullable()->change(); + $table->string('email')->nullable()->change(); + $table->string('license_key')->unique()->nullable()->change(); + $table->boolean('is_claimed')->nullable()->change(); + $table->string('transaction_reference')->nullable()->change(); + }); } catch (Exception $exception) { // do nothing, change only needed for invoiceninja servers }