Update enabled_modules

This commit is contained in:
David Bomba 2020-07-21 21:27:55 +10:00
parent 91c40b0517
commit d9f179b84d

View File

@ -0,0 +1,32 @@
<?php
use App\Models\Company;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateEnabledModulesValue extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Company::cursor()->each(function ($company){
$company->enabled_modules = 32767;
$company->save();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}