Files
SnowLuma/.pnpm-store/v11/files/a8/e49478a5bfe2a271072ebf4b7970e06cd831f34493a077fa7758ca15e5effe911323b02ab466f1d3ad1749fd1086dd0a755a2f39f532066db795be3450b1ee
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

29 lines
872 B
Plaintext

// Hand-maintained declaration for lib/migrate.js (sqlite3.migrate). The
// runner itself is JSDoc-documented in the implementation file.
import type { Database } from './native.js';
/**
* One migration: a name, and either a SQL script or a programmatic body.
*/
export interface Migration {
/** The migration's name (for errors and reporting). */
name: string;
/** The SQL script (or use `up`). */
sql?: string;
/** A programmatic body; receives the transaction connection. */
up?(tx: Database): unknown;
}
/**
* Runs every pending migration against the connection, in order, each in
* one transaction with `PRAGMA user_version` tracking the position.
* Idempotent.
*
* @since 9.1.0
*/
export declare function migrate(
db: Database,
migrations: string | Migration[],
): Promise<{ applied: string[]; from: number; to: number }>;