import type { DB } from '../db/index.js'; /** * What the tracker table says has been applied, in whichever vocabulary the * table currently speaks: * * - `tags`: the upgraded shape — applied = the exact set of recorded migration * tags (see `applyMigrations`, which owns the membership semantics and the * legacy-table upgrade). * - `legacy-threshold`: a not-yet-upgraded table (no `tag` column) can only * express the old high-water mark, `max(created_at)`. It is read for exactly * one purpose: scoping the pre-apply SAFETY check to pending migrations, so * a fully-current database with a destructive op in its applied history can * still run a clean no-op `migrate`. `applyMigrations` upgrades the table on * its next run, after which this variant never appears again. * * `null` — the table does not exist; nothing has been applied. */ export type AppliedState = { kind: 'tags'; tags: ReadonlySet; } | { kind: 'legacy-threshold'; threshold: number; }; export declare function readAppliedState(db: DB, migrationsTable: string): Promise; //# sourceMappingURL=applied.d.ts.map