partial update fix sync data pbg

This commit is contained in:
arifal
2025-08-07 22:04:40 +07:00
parent dd1cd72450
commit 3902a486f7
11 changed files with 114 additions and 9 deletions

View File

@@ -0,0 +1,40 @@
<?php
namespace App\Console\Commands;
use App\Models\PbgTask;
use App\Models\PbgTaskAttachment;
use App\Models\PbgTaskDetail;
use App\Models\PbgTaskRetributions;
use DB;
use Illuminate\Console\Command;
class TruncatePBGTable extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'app:truncate-pbg-table';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Execute the console command.
*/
public function handle()
{
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
PbgTask::truncate();
PbgTaskAttachment::truncate();
PbgTaskRetributions::truncate();
PbgTaskDetail::truncate();
DB::statement('SET FOREIGN_KEY_CHECKS=1;');
}
}