Fix for migration

This commit is contained in:
Hillel Coren 2016-12-18 21:29:50 +02:00
parent c0fdc73f20
commit 7b5af7e2b8

View File

@ -11,6 +11,8 @@ class AddInvoiceSignature extends Migration
* @return void
*/
public function up()
{
if ( ! Schema::hasColumn('invitations', 'signature_base64'))
{
Schema::table('invitations', function($table)
{
@ -29,6 +31,7 @@ class AddInvoiceSignature extends Migration
Schema::table('payment_methods', function($table)
{
$table->unsignedInteger('account_gateway_token_id')->nullable()->change();
$table->dropForeign('payment_methods_account_gateway_token_id_foreign');
});
@ -47,6 +50,7 @@ class AddInvoiceSignature extends Migration
$table->foreign('payment_method_id')->references('id')->on('payment_methods')->onDelete('cascade');;
});
}
}
/**
* Reverse the migrations.