/** * Memoized `readMigrationFiles` (T13126). * * drizzle's `readMigrationFiles` reads every `migration.sql` in a lineage and * hashes it. A single store open reconciles its journal through several helpers * that each read the same lineage (and its sibling lineage) again, so one * command read and hashed the same ~1.4 MB of SQL about a dozen times. This * reads a lineage once per process and re-reads it whenever the folder's * contents change: the cache key includes each migration's name, size and * mtime, so a test (or a dev rebuild) that rewrites a migration never sees a * stale answer. The one change it cannot see is an in-place rewrite to the * same length within the same mtime tick; shipped migrations never change * while a process runs. * * @task T13126 */ import { readMigrationFiles } from 'drizzle-orm/migrator'; /** One lineage's migrations, as drizzle's `readMigrationFiles` returns them. */ export type MigrationFiles = ReturnType; /** * The migrations of one lineage folder, read and hashed once per content state. * * @param migrationsFolder - The lineage folder (`.../migrations/drizzle-`). * @returns A fresh array of drizzle's migration entries. Entries are shared * between calls; callers must not mutate them. * @throws Whatever drizzle's `readMigrationFiles` throws (missing folder, * legacy `meta/_journal.json` layout). Failures are not cached. */ export declare function readMigrationFilesCached(migrationsFolder: string): MigrationFiles; //# sourceMappingURL=migration-files.d.ts.map