mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-18 10:16:49 +00:00
Add more info.
This commit is contained in:
@@ -105,7 +105,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->line(sprintf('nextval is NULL for table "%s"', $tableToCheck));
|
$this->line(sprintf('nextval is NULL for table "%s", go to next table.', $tableToCheck));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,6 +120,9 @@ class FixPostgresSequences extends Command
|
|||||||
$this->warn(sprintf('Arff! The nextval sequence is still all screwed up on table "%s".', $tableToCheck));
|
$this->warn(sprintf('Arff! The nextval sequence is still all screwed up on table "%s".', $tableToCheck));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($nextId->nextval >= $highestId->max) {
|
||||||
|
$this->info(sprintf('Table "%s" autoincrement is correct.', $tableToCheck));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user