added 2.0.8 update listener
This commit is contained in:
parent
201a3696a4
commit
795ddf8aeb
29
app/Listeners/Update/V20/Version208.php
Normal file
29
app/Listeners/Update/V20/Version208.php
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Listeners\Update\V20;
|
||||||
|
|
||||||
|
use App\Abstracts\Listeners\Update as Listener;
|
||||||
|
use App\Events\Install\UpdateFinished as Event;
|
||||||
|
use Illuminate\Support\Facades\Artisan;
|
||||||
|
|
||||||
|
class Version208 extends Listener
|
||||||
|
{
|
||||||
|
const ALIAS = 'core';
|
||||||
|
|
||||||
|
const VERSION = '2.0.8';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle the event.
|
||||||
|
*
|
||||||
|
* @param $event
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handle(Event $event)
|
||||||
|
{
|
||||||
|
if ($this->skipThisUpdate($event)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Artisan::call('migrate', ['--force' => true]);
|
||||||
|
}
|
||||||
|
}
|
@ -18,6 +18,7 @@ class Event extends Provider
|
|||||||
'App\Listeners\Update\V20\Version203',
|
'App\Listeners\Update\V20\Version203',
|
||||||
'App\Listeners\Update\V20\Version205',
|
'App\Listeners\Update\V20\Version205',
|
||||||
'App\Listeners\Update\V20\Version207',
|
'App\Listeners\Update\V20\Version207',
|
||||||
|
'App\Listeners\Update\V20\Version208',
|
||||||
],
|
],
|
||||||
'Illuminate\Auth\Events\Login' => [
|
'Illuminate\Auth\Events\Login' => [
|
||||||
'App\Listeners\Auth\Login',
|
'App\Listeners\Auth\Login',
|
||||||
|
@ -15,7 +15,7 @@ class CoreV200 extends Migration
|
|||||||
{
|
{
|
||||||
// Footer column
|
// Footer column
|
||||||
Schema::table('invoices', function (Blueprint $table) {
|
Schema::table('invoices', function (Blueprint $table) {
|
||||||
$table->text('footer')->nullable();
|
$table->text('footer')->nullable()->after('notes');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Contacts
|
// Contacts
|
||||||
@ -238,7 +238,7 @@ class CoreV200 extends Migration
|
|||||||
|
|
||||||
// Landing page column
|
// Landing page column
|
||||||
Schema::table('users', function (Blueprint $table) {
|
Schema::table('users', function (Blueprint $table) {
|
||||||
$table->string('landing_page', 70)->nullable()->default('dashboard');
|
$table->string('landing_page', 70)->nullable()->default('dashboard')->after('locale');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,21 +13,15 @@ class CoreV208 extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::table(
|
Schema::table('invoice_items', function (Blueprint $table) {
|
||||||
'invoice_items',
|
|
||||||
function (Blueprint $table) {
|
|
||||||
$table->double('discount_rate', 15, 4)->default('0.0000')->after('tax');
|
$table->double('discount_rate', 15, 4)->default('0.0000')->after('tax');
|
||||||
$table->string('discount_type')->default('normal')->after('discount_rate');
|
$table->string('discount_type')->default('normal')->after('discount_rate');
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
Schema::table(
|
Schema::table('bill_items', function (Blueprint $table) {
|
||||||
'bill_items',
|
|
||||||
function (Blueprint $table) {
|
|
||||||
$table->double('discount_rate', 15, 4)->default('0.0000')->after('tax');
|
$table->double('discount_rate', 15, 4)->default('0.0000')->after('tax');
|
||||||
$table->string('discount_type')->default('normal')->after('discount_rate');
|
$table->string('discount_type')->default('normal')->after('discount_rate');
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -37,18 +31,12 @@ class CoreV208 extends Migration
|
|||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table(
|
Schema::table('invoice_items', function (Blueprint $table) {
|
||||||
'invoice_items',
|
|
||||||
function (Blueprint $table) {
|
|
||||||
$table->dropColumn(['discount_rate', 'discount_type']);
|
$table->dropColumn(['discount_rate', 'discount_type']);
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
Schema::table(
|
Schema::table('bill_items', function (Blueprint $table) {
|
||||||
'bill_items',
|
|
||||||
function (Blueprint $table) {
|
|
||||||
$table->dropColumn(['discount_rate', 'discount_type']);
|
$table->dropColumn(['discount_rate', 'discount_type']);
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user