import type { DatabaseSync } from 'node:sqlite'; import type { ApplyMigrationsOptions } from './types.js'; /** Baseline schema version applied from schema.sql on first open. */ export declare const XOPC_DB_BASELINE_SCHEMA_VERSION = 11; /** Latest schema version this release supports (increment when adding migrations). */ export declare const XOPC_DB_SCHEMA_VERSION = 117; export declare function resolveMigrationsDir(override?: string): string; /** * Apply sequential SQL migrations from (currentVersion + 1) through targetVersion. * Each step runs in its own transaction and updates schema_meta on success. */ export declare function applyPendingMigrations(db: DatabaseSync, options?: ApplyMigrationsOptions): number; export type SchemaMigrationStatus = { dbVersion: number; appVersion: number; pendingVersions: number[]; isTooNew: boolean; hasMigrationGap: boolean; missingVersion: number | null; }; /** Inspect schema version without mutating the database. */ export declare function inspectSchemaMigrationStatus(db: DatabaseSync, options?: Pick): SchemaMigrationStatus;