UNPKG

@clickup/pg-mig

Version:

PostgreSQL schema migration tool with microsharding and clustering support

29 lines 966 B
import { Semaphore } from "await-semaphore"; import type { Dest } from "./Dest"; import type { Chain, Migration } from "./Patch"; export interface MigrationOutput { dest: Dest; migration: Migration; payload: unknown; } export declare class Worker { private chainsQueue; private semaphores; private succeededMigrations; private errorMigrations; private warningMigrations; private curDest; private curMigration; private curLine; constructor(chainsQueue: Chain[], semaphores: Record<string, Semaphore>); getSucceededMigrations(): number; getErrorMigrations(): readonly MigrationOutput[]; getWarningMigrations(): readonly MigrationOutput[]; getCurDest(): Readonly<Dest> | null; getCurMigration(): Readonly<Migration> | null; getCurLine(): string | null; run(onChange: () => void): Promise<void>; private processMigration; private acquireSemaphore; } //# sourceMappingURL=Worker.d.ts.map