feat: app reports ready only after the startup migration run (E00-S03-T06)
This commit is contained in:
@@ -28,6 +28,9 @@
|
||||
* allowed to import the PostgreSQL driver (E00-S03-T02) — and talks to the
|
||||
* database exclusively through the package-owned `pg` Pool and the
|
||||
* `MigrationLedger`, so no other package needs the driver to run migrations.
|
||||
* The app (apps/server) runs this runner at startup and gates its readiness
|
||||
* on the run (E00-S03-T06): it does not report ready before the run
|
||||
* completes.
|
||||
*
|
||||
* Rollback note from the issue: revert the diagnostic/error handling changes.
|
||||
*/
|
||||
@@ -128,7 +131,8 @@ function structuredCause(cause: unknown): Record<string, unknown> {
|
||||
* The migration runner: applies pending migrations in order, exactly once,
|
||||
* through the migration ledger. Instances are cheap and share the caller's
|
||||
* pool and ledger; the runner performs no locking (advisory lock is
|
||||
* E00-S03-T04) and no ready gating (E00-S03-T06).
|
||||
* E00-S03-T04) and no ready gating (the app gates its readiness on the run,
|
||||
* E00-S03-T06).
|
||||
*/
|
||||
export class MigrationRunner {
|
||||
private readonly pool: Pool;
|
||||
|
||||
Reference in New Issue
Block a user