-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
375718b
commit 0c579d0
Showing
3 changed files
with
91 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace App\Listeners\Updates; | ||
|
||
use App\Events\UpdateFinished; | ||
use Artisan; | ||
|
||
class Version1210 extends Listener | ||
{ | ||
const ALIAS = 'core'; | ||
|
||
const VERSION = '1.2.10'; | ||
|
||
/** | ||
* Handle the event. | ||
* | ||
* @param $event | ||
* @return void | ||
*/ | ||
public function handle(UpdateFinished $event) | ||
{ | ||
// Check if should listen | ||
if (!$this->check($event)) { | ||
return; | ||
} | ||
|
||
// Update database | ||
Artisan::call('migrate', ['--force' => true]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
database/migrations/2018_06_30_000000_modify_enabled_column.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
|
||
class ModifyEnabledColumn extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::table('accounts', function (Blueprint $table) { | ||
$table->tinyInteger('enabled')->default(1)->change(); | ||
}); | ||
|
||
Schema::table('categories', function (Blueprint $table) { | ||
$table->tinyInteger('enabled')->default(1)->change(); | ||
}); | ||
|
||
Schema::table('currencies', function (Blueprint $table) { | ||
$table->tinyInteger('enabled')->default(1)->change(); | ||
}); | ||
|
||
Schema::table('items', function (Blueprint $table) { | ||
$table->tinyInteger('enabled')->default(1)->change(); | ||
}); | ||
|
||
Schema::table('customers', function (Blueprint $table) { | ||
$table->tinyInteger('enabled')->default(1)->change(); | ||
}); | ||
|
||
Schema::table('vendors', function (Blueprint $table) { | ||
$table->tinyInteger('enabled')->default(1)->change(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
|
||
} | ||
} |