UNPKG

flint-orm

Version:

Type-safe SQLite ORM for JavaScript

19 lines (18 loc) 762 B
import type { TableDef } from '../schema/table'; import type { SchemaState, MigrationOperation } from './types'; import type { RenamePrompt } from './diff'; export interface GenerateResult { folderName: string; operations: MigrationOperation[]; sql: string; state: SchemaState; } export interface GenerateOptions { /** Migration folder name override. */ name?: string; /** Whether to run interactive rename prompts. Defaults to true. */ interactive?: boolean; /** Custom prompt function for rename resolution. Required when interactive is true. */ prompt?: RenamePrompt; } export declare function generate(tables: TableDef<any>[], migrationsDir: string, nameOrOptions?: string | GenerateOptions): Promise<GenerateResult>;