From 207da277644c6c094ad0852ce5d796a333c2fce9 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 18 Apr 2017 12:55:10 +0300 Subject: [PATCH] Sync up table schema --- ...7_04_16_101744_add_custom_contact_fields.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/database/migrations/2017_04_16_101744_add_custom_contact_fields.php b/database/migrations/2017_04_16_101744_add_custom_contact_fields.php index 8930d4b4b5..ddf0aa90e0 100644 --- a/database/migrations/2017_04_16_101744_add_custom_contact_fields.php +++ b/database/migrations/2017_04_16_101744_add_custom_contact_fields.php @@ -21,6 +21,23 @@ class AddCustomContactFields extends Migration $table->string('custom_value1')->nullable(); $table->string('custom_value2')->nullable(); }); + + Schema::table('payment_methods', function ($table) { + $table->unsignedInteger('account_gateway_token_id')->nullable()->change(); + $table->dropForeign('payment_methods_account_gateway_token_id_foreign'); + }); + + Schema::table('payment_methods', function ($table) { + $table->foreign('account_gateway_token_id')->references('id')->on('account_gateway_tokens')->onDelete('cascade'); + }); + + Schema::table('payments', function ($table) { + $table->dropForeign('payments_payment_method_id_foreign'); + }); + + Schema::table('payments', function ($table) { + $table->foreign('payment_method_id')->references('id')->on('payment_methods')->onDelete('cascade'); + }); } /**