UNPKG

@accounter/server

Version:

The test suite is split into three Vitest projects for efficiency and isolation:

17 lines (16 loc) 575 B
import { sql, type DatabasePool } from 'slonik'; export type MigrationExecutor = { name: string; /** * You can either return a SQL query to run or instead use the connection within the function to run custom logic. * You can also return an array of named steps so you can see the progress in the logs. */ run: (args: { sql: typeof sql.unsafe; }) => ReturnType<typeof sql.unsafe>; }; export declare function runMigrations(args: { slonik: DatabasePool; migrations: Array<MigrationExecutor>; runTo?: string; }): Promise<void>;