Sync up table schema

This commit is contained in:
Hillel Coren 2017-04-18 12:55:10 +03:00
parent 484d88cfef
commit 207da27764

View File

@ -21,6 +21,23 @@ class AddCustomContactFields extends Migration
$table->string('custom_value1')->nullable(); $table->string('custom_value1')->nullable();
$table->string('custom_value2')->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');
});
} }
/** /**