James Cole
2023-06-21 09:58:37 +02:00
parent 2b78485a61
commit 8d87abde64

View File

@@ -124,8 +124,7 @@ class FixPostgresSequences extends Command
$highestId = DB::table($tableToCheck)->select(DB::raw('MAX(id)'))->first(); $highestId = DB::table($tableToCheck)->select(DB::raw('MAX(id)'))->first();
$nextId = DB::table($tableToCheck)->select(DB::raw(sprintf('nextval(\'%s_id_seq\')', $tableToCheck)))->first(); $nextId = DB::table($tableToCheck)->select(DB::raw(sprintf('nextval(\'%s_id_seq\')', $tableToCheck)))->first();
if (null === $nextId) { if (null === $nextId) {
$this->friendlyInfo(); $this->friendlyInfo(sprintf('nextval is NULL for table "%s", go to next table.', $tableToCheck));
e(sprintf('nextval is NULL for table "%s", go to next table.', $tableToCheck));
continue; continue;
} }