Contact enabled column set default 1
This commit is contained in:
parent
b11fa98e34
commit
0e47589246
@ -4,6 +4,7 @@ namespace App\Listeners\Update\V21;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
class Version2126 extends Listener
|
||||
{
|
||||
@ -24,6 +25,8 @@ class Version2126 extends Listener
|
||||
return;
|
||||
}
|
||||
|
||||
Artisan::call('migrate', ['--force' => true]);
|
||||
|
||||
$country_code = array_search(setting('company.country'), trans('countries'));
|
||||
|
||||
if ($country_code) {
|
||||
|
30
database/migrations/2021_09_10_000000_core_v2126.php
Normal file
30
database/migrations/2021_09_10_000000_core_v2126.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CoreV2126 extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('contacts', function (Blueprint $table) {
|
||||
$table->boolean('enabled')->default(1)->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user