Fix for down migrations

This commit is contained in:
Hillel Coren 2017-04-06 21:48:56 +03:00
parent ee82bf13af
commit 1f244c94d4
2 changed files with 11 additions and 5 deletions

View File

@ -34,8 +34,12 @@ class AddPartialAmountToInvoices extends Migration
});
Schema::table('accounts', function ($table) {
$table->dropColumn('utf8_invoices');
$table->dropColumn('auto_wrap');
if (Schema::hasColumn('accounts', 'utf8_invoices')) {
$table->dropColumn('utf8_invoices');
}
if (Schema::hasColumn('accounts', 'auto_wrap')) {
$table->dropColumn('auto_wrap');
}
$table->dropColumn('subdomain');
});
}

View File

@ -54,9 +54,11 @@ class SimplifyTasks extends Migration
$table->integer('break_duration')->nullable();
});
Schema::table('users', function ($table) {
$table->dropColumn('dark_mode');
});
if (Schema::hasColumn('accounts', 'dark_mode')) {
Schema::table('users', function ($table) {
$table->dropColumn('dark_mode');
});
}
Schema::table('users', function ($table) {
$table->integer('theme_id')->nullable();
});