diff --git a/app/Listeners/Update/V20/Version208.php b/app/Listeners/Update/V20/Version208.php new file mode 100644 index 000000000..988d1b08c --- /dev/null +++ b/app/Listeners/Update/V20/Version208.php @@ -0,0 +1,29 @@ +skipThisUpdate($event)) { + return; + } + + Artisan::call('migrate', ['--force' => true]); + } +} diff --git a/app/Providers/Event.php b/app/Providers/Event.php index d115bd6af..7d9afd560 100644 --- a/app/Providers/Event.php +++ b/app/Providers/Event.php @@ -18,6 +18,7 @@ class Event extends Provider 'App\Listeners\Update\V20\Version203', 'App\Listeners\Update\V20\Version205', 'App\Listeners\Update\V20\Version207', + 'App\Listeners\Update\V20\Version208', ], 'Illuminate\Auth\Events\Login' => [ 'App\Listeners\Auth\Login', diff --git a/database/migrations/2020_01_08_000000_core_v200.php b/database/migrations/2020_01_08_000000_core_v200.php index 0735f5a66..6602dcb4e 100644 --- a/database/migrations/2020_01_08_000000_core_v200.php +++ b/database/migrations/2020_01_08_000000_core_v200.php @@ -15,7 +15,7 @@ class CoreV200 extends Migration { // Footer column Schema::table('invoices', function (Blueprint $table) { - $table->text('footer')->nullable(); + $table->text('footer')->nullable()->after('notes'); }); // Contacts @@ -238,7 +238,7 @@ class CoreV200 extends Migration // Landing page column Schema::table('users', function (Blueprint $table) { - $table->string('landing_page', 70)->nullable()->default('dashboard'); + $table->string('landing_page', 70)->nullable()->default('dashboard')->after('locale'); }); } diff --git a/database/migrations/2020_03_20_183732_core_v208.php b/database/migrations/2020_03_20_183732_core_v208.php index 896df429d..7e4c586db 100644 --- a/database/migrations/2020_03_20_183732_core_v208.php +++ b/database/migrations/2020_03_20_183732_core_v208.php @@ -13,21 +13,15 @@ class CoreV208 extends Migration */ public function up() { - Schema::table( - 'invoice_items', - function (Blueprint $table) { - $table->double('discount_rate', 15, 4)->default('0.0000')->after('tax'); - $table->string('discount_type')->default('normal')->after('discount_rate'); - } - ); + Schema::table('invoice_items', function (Blueprint $table) { + $table->double('discount_rate', 15, 4)->default('0.0000')->after('tax'); + $table->string('discount_type')->default('normal')->after('discount_rate'); + }); - Schema::table( - 'bill_items', - function (Blueprint $table) { - $table->double('discount_rate', 15, 4)->default('0.0000')->after('tax'); - $table->string('discount_type')->default('normal')->after('discount_rate'); - } - ); + Schema::table('bill_items', function (Blueprint $table) { + $table->double('discount_rate', 15, 4)->default('0.0000')->after('tax'); + $table->string('discount_type')->default('normal')->after('discount_rate'); + }); } /** @@ -37,18 +31,12 @@ class CoreV208 extends Migration */ public function down() { - Schema::table( - 'invoice_items', - function (Blueprint $table) { - $table->dropColumn(['discount_rate', 'discount_type']); - } - ); + Schema::table('invoice_items', function (Blueprint $table) { + $table->dropColumn(['discount_rate', 'discount_type']); + }); - Schema::table( - 'bill_items', - function (Blueprint $table) { - $table->dropColumn(['discount_rate', 'discount_type']); - } - ); + Schema::table('bill_items', function (Blueprint $table) { + $table->dropColumn(['discount_rate', 'discount_type']); + }); } }