CoolFace
Apppublic

AK-21/Graphite-Industrial-Intelligence

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
migrator.d.ts30 linesDownload Raw Back to op-sqlite
1import type { OPSQLiteDatabase } from "./driver.js";2interface MigrationConfig {3    journal: {4        entries: {5            idx: number;6            when: number;7            tag: string;8            breakpoints: boolean;9        }[];10    };11    migrations: Record<string, string>;12}13export declare function migrate<TSchema extends Record<string, unknown>>(db: OPSQLiteDatabase<TSchema>, config: MigrationConfig): Promise<void>;14interface State {15    success: boolean;16    error?: Error;17}18export declare const useMigrations: (db: OPSQLiteDatabase<any>, migrations: {19    journal: {20        entries: {21            idx: number;22            when: number;23            tag: string;24            breakpoints: boolean;25        }[];26    };27    migrations: Record<string, string>;28}) => State;29export {};30