Fix for rolling back migrations

This commit is contained in:
Hillel Coren 2016-08-15 20:10:48 +03:00
parent 8133d6bbfe
commit 2d87de6a6a
2 changed files with 4 additions and 5 deletions

View File

@ -63,7 +63,7 @@ class AddPageSize extends Migration
}); });
Schema::table('expenses', function ($table) { Schema::table('expenses', function ($table) {
$table->dropForeign('expenses_expense_category_id_foreign'); //$table->dropForeign('expenses_expense_category_id_foreign');
$table->dropColumn('expense_category_id'); $table->dropColumn('expense_category_id');
}); });

View File

@ -109,8 +109,7 @@ class PaymentsChanges extends Migration
Schema::table('account_gateway_tokens', function($table) Schema::table('account_gateway_tokens', function($table)
{ {
$table->unsignedInteger('default_payment_method_id')->nullable(); $table->unsignedInteger('default_payment_method_id')->nullable();
$table->foreign('default_payment_method_id')->references('id')->on('payment_methods'); //$table->foreign('default_payment_method_id')->references('id')->on('payment_methods');
}); });
} }
@ -134,7 +133,7 @@ class PaymentsChanges extends Migration
$table->dropColumn('gateway_error'); $table->dropColumn('gateway_error');
$table->dropColumn('email'); $table->dropColumn('email');
$table->dropForeign('payments_payment_method_id_foreign'); //$table->dropForeign('payments_payment_method_id_foreign');
$table->dropColumn('payment_method_id'); $table->dropColumn('payment_method_id');
}); });
@ -164,7 +163,7 @@ class PaymentsChanges extends Migration
Schema::table('account_gateway_tokens', function($table) Schema::table('account_gateway_tokens', function($table)
{ {
$table->dropForeign('account_gateway_tokens_default_payment_method_id_foreign'); //$table->dropForeign('account_gateway_tokens_default_payment_method_id_foreign');
$table->dropColumn('default_payment_method_id'); $table->dropColumn('default_payment_method_id');
}); });