import { R as RawAccess } from '../config-CBTr4IhE.cjs'; declare const DEFAULT_MIGRATION_TABLE_NAME = "rivetkit_schema_version"; type MigrationDatabase = Pick; type Migration = { version: number; sql: string; up?: never; } | { version: number; sql?: never; up: (db: MigrationDatabase) => Promise | void; }; interface MigrationsOptions { /** A table owned by this schema. Override this when multiple schemas share a database. */ tableName?: string; /** Detect the version of a schema that predates its migration table. */ adopt?: (db: MigrationDatabase) => Promise | number; /** Contiguous migrations numbered from 1. */ migrations: readonly Migration[]; } /** * Creates an `onMigrate` callback that applies each unapplied migration in order. * RivetKit runs the callback inside its migration savepoint, making the complete * ladder atomic when used with `db({ onMigrate })`. */ declare function migrations({ tableName, adopt, migrations: ladder, }: MigrationsOptions): (db: MigrationDatabase) => Promise; export { DEFAULT_MIGRATION_TABLE_NAME, type Migration, type MigrationDatabase, type MigrationsOptions, migrations };