Add store method to list all migrations

[MAILPOET-4466]
This commit is contained in:
Jan Jakes
2022-10-27 16:18:50 +02:00
committed by Aschepikov
parent b10cd32449
commit 17ab79aa6f
2 changed files with 38 additions and 0 deletions

View File

@@ -44,6 +44,14 @@ class Store {
", [$error ?: 'Unknown error', $name]);
}
public function getAll(): array {
return $this->connection->fetchAllAssociative("
SELECT *
FROM {$this->table}
ORDER BY id ASC
");
}
public function ensureMigrationsTable(): void {
$collate = Env::$dbCharsetCollate;
$this->connection->executeStatement("