diff --git a/database/migrations/2015_04_16_122647_add_partial_amount_to_invoices.php b/database/migrations/2015_04_16_122647_add_partial_amount_to_invoices.php index ac07a0d78151..488940d63b8f 100644 --- a/database/migrations/2015_04_16_122647_add_partial_amount_to_invoices.php +++ b/database/migrations/2015_04_16_122647_add_partial_amount_to_invoices.php @@ -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'); }); } diff --git a/database/migrations/2015_07_08_114333_simplify_tasks.php b/database/migrations/2015_07_08_114333_simplify_tasks.php index 776f2c2b501b..84c6ffe1d88f 100644 --- a/database/migrations/2015_07_08_114333_simplify_tasks.php +++ b/database/migrations/2015_07_08_114333_simplify_tasks.php @@ -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(); });