From 0113d553018e6044c0c323b40b3d8addf08d1b45 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 29 Nov 2016 21:06:06 +0200 Subject: [PATCH] Fix for self host database migrations --- database/migrations/2016_04_23_182223_payments_changes.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/database/migrations/2016_04_23_182223_payments_changes.php b/database/migrations/2016_04_23_182223_payments_changes.php index 2b69336740..61d0d16eef 100644 --- a/database/migrations/2016_04_23_182223_payments_changes.php +++ b/database/migrations/2016_04_23_182223_payments_changes.php @@ -64,6 +64,11 @@ class PaymentsChanges extends Migration $table->timestamps(); $table->softDeletes(); + $table->unsignedInteger('public_id')->index(); + }); + + Schema::table('payment_methods', function($table) + { $table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->foreign('contact_id')->references('id')->on('contacts')->onDelete('cascade'); @@ -71,7 +76,6 @@ class PaymentsChanges extends Migration $table->foreign('payment_type_id')->references('id')->on('payment_types'); $table->foreign('currency_id')->references('id')->on('currencies'); - $table->unsignedInteger('public_id')->index(); $table->unique( array('account_id','public_id') ); });