UNPKG

bknd

Version:

Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.

16 lines (15 loc) 747 B
import type { Kysely } from "kysely"; export type MigrationContext = { db: Kysely<any>; }; export type GenericConfigObject = Record<string, any>; export type Migration = { version: number; schema?: true; up: (config: GenericConfigObject, ctx: MigrationContext) => Promise<GenericConfigObject>; }; export declare const migrations: Migration[]; export declare const CURRENT_VERSION: number; export declare const TABLE_NAME = "__bknd"; export declare function migrateTo(current: number, to: number, config: GenericConfigObject, ctx: MigrationContext): Promise<[number, GenericConfigObject]>; export declare function migrate(current: number, config: GenericConfigObject, ctx: MigrationContext): Promise<[number, GenericConfigObject]>;