style: Pint 포맷팅 적용
This commit is contained in:
@@ -65,10 +65,10 @@ public function getTableTriggerStatus(): array
|
||||
", [$dbName, $table]);
|
||||
|
||||
// 컬럼 수 조회
|
||||
$colCount = DB::selectOne("
|
||||
$colCount = DB::selectOne('
|
||||
SELECT COUNT(*) as cnt FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ?
|
||||
", [$dbName, $table])->cnt;
|
||||
', [$dbName, $table])->cnt;
|
||||
|
||||
$tableTriggers = $triggers->where('EVENT_OBJECT_TABLE', $table);
|
||||
|
||||
@@ -205,8 +205,8 @@ private function createTriggersForTable(string $dbName, string $table): void
|
||||
return;
|
||||
}
|
||||
|
||||
$newJson = 'JSON_OBJECT(' . collect($cols)->map(fn ($c) => "'{$c}', NEW.`{$c}`")->implode(', ') . ')';
|
||||
$oldJson = 'JSON_OBJECT(' . collect($cols)->map(fn ($c) => "'{$c}', OLD.`{$c}`")->implode(', ') . ')';
|
||||
$newJson = 'JSON_OBJECT('.collect($cols)->map(fn ($c) => "'{$c}', NEW.`{$c}`")->implode(', ').')';
|
||||
$oldJson = 'JSON_OBJECT('.collect($cols)->map(fn ($c) => "'{$c}', OLD.`{$c}`")->implode(', ').')';
|
||||
|
||||
$changedCols = collect($cols)->map(fn ($c) => "IF(NOT (NEW.`{$c}` <=> OLD.`{$c}`), '{$c}', NULL)")->implode(', ');
|
||||
$changeCheck = collect($cols)->map(fn ($c) => "NOT (NEW.`{$c}` <=> OLD.`{$c}`)")->implode(' OR ');
|
||||
|
||||
Reference in New Issue
Block a user