From 30daf0c29f0827654f63a7a7bbc6dc3935ba1fc3 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 29 Nov 2016 21:05:42 +0200 Subject: [PATCH] Fix for self host database migrations --- database/migrations/2016_04_16_103943_enterprise_plan.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/database/migrations/2016_04_16_103943_enterprise_plan.php b/database/migrations/2016_04_16_103943_enterprise_plan.php index 41ec9dfc4ae6..7b3bca557594 100644 --- a/database/migrations/2016_04_16_103943_enterprise_plan.php +++ b/database/migrations/2016_04_16_103943_enterprise_plan.php @@ -32,7 +32,7 @@ class EnterprisePlan extends Migration $table->date('plan_expires')->nullable(); $table->unsignedInteger('payment_id')->nullable(); - $table->foreign('payment_id')->references('id')->on('payments'); + $table->date('trial_started')->nullable(); $table->enum('trial_plan', array('pro', 'enterprise'))->nullable(); @@ -43,6 +43,11 @@ class EnterprisePlan extends Migration $table->timestamps(); $table->softDeletes(); }); + + Schema::table('companies', function($table) + { + $table->foreign('payment_id')->references('id')->on('payments'); + }); } if (!Schema::hasColumn('accounts', 'company_id')) {