import { type MigrationResult, type MigrationStatus, type SchemaMigration } from '../utils/schema-migrations.js'; import { type SqliteDatabaseLike, type SqliteLikeClient } from './client.js'; export { type AppliedMigration, type MigrationResult, type MigrationStatus, migrationChecksum, type SchemaMigration, SchemaMigrationError, } from '../utils/schema-migrations.js'; /** Options for applying or inspecting SQLite migrations. */ export interface SqliteMigrateOptions { /** Plans without writing anything, not even the table that records migrations. */ dryRun?: boolean; /** The table that records applied migrations. Defaults to `nexus_schema_migrations`. */ table?: string; } /** * Where a SQLite database stands against a list of migrations. Reads only: on a database that has * never been migrated, everything is pending. */ export declare function sqliteMigrationStatus(database: SqliteLikeClient | SqliteDatabaseLike, migrations: readonly SchemaMigration[], options?: Pick): Promise; /** * Applies the pending migrations in order, recording each with a checksum. * * Each migration runs inside `BEGIN IMMEDIATE`, which takes SQLite's write lock: its statements and * the row recording it land together or not at all, and a second process migrating the same file * waits for the first instead of interleaving with it. A migration whose statements changed after it * ran is refused before anything is written. */ export declare function applySqliteMigrations(database: SqliteLikeClient | SqliteDatabaseLike, migrations: readonly SchemaMigration[], options?: SqliteMigrateOptions): Promise; /** The statement that creates the migrations table, which `migrate()` runs first. */ export declare function sqliteMigrationsTableStatement(table?: string): string;