vael:db/migrate
Deterministic SQL migration loader, dry-run planner, multi-driver runner,
and reconciliation API for vael:db/migrate.
Available in the vjs (vaeljs) runtime only; absent in vjs-lite.
Supports paired NNNN_name.up.sql / NNNN_name.down.sql files and
single-file NNNN_name.sql migrations (-- migrate:up / -- migrate:down),
dialect identifier bindings, read-only status() / plan(), safe
--step / --to prefix planning, and MySQL/MariaDB dirty reconciliation.
import ... from "vael:db/migrate"
vael-db (SQLite enabled by default in vaeljs-core; opt-in network drivers vael-db-postgres, vael-db-mysql, vael-db-mariadb, vael-db-mssql, vael-db-all; absent in vaeljs-lite-core)Example
Section titled “Example”import { openSqlite } from "vael:db";import { plan, status, up } from "vael:db/migrate";
await using db = await openSqlite(":memory:");const before = await status(db, "./migrations");if (before.pending.length > 0) { const dryRun = await plan(db, "./migrations"); console.log("Steps:", dryRun.steps.length); await up(db, "./migrations");}loadMigrationsvjs onlyv0.0.0-alpha.2statusvjs onlyv0.0.0-alpha.2planvjs onlyv0.0.0-alpha.2up or down steps without executing writes.upvjs onlyv0.0.0-alpha.2up migrations (all, --step, or --to) atomically where supported.downvjs onlyv0.0.0-alpha.2step: 1; never rolls back all implicitly).verifyvjs onlyv0.0.0-alpha.2reconcilevjs onlyv0.0.0-alpha.2flattenvjs onlyv0.0.0-alpha.2MigrationDatabasevjs onlyv0.0.0-alpha.2Database<DB> regardless of schema generic parameter DB.LoadedMigrationvjs onlyv0.0.0-alpha.2loadMigrations().LoadMigrationsOptionsvjs onlyv0.0.0-alpha.2loadMigrations().MigrateOptionsvjs onlyv0.0.0-alpha.2MigratePlanOptionsvjs onlyv0.0.0-alpha.2plan().MigrateUpOptionsvjs onlyv0.0.0-alpha.2up().MigrateDownOptionsvjs onlyv0.0.0-alpha.2down().ReconcileOptionsvjs onlyv0.0.0-alpha.2reconcile() on MySQL/MariaDB dirty ledgers.FlattenOptionsvjs onlyv0.0.0-alpha.2flatten() on SQLite and PostgreSQL.AppliedMigrationInfovjs onlyv0.0.0-alpha.2MigrationStatus.PendingMigrationInfovjs onlyv0.0.0-alpha.2MigrationStatus.MigrationDriftInfovjs onlyv0.0.0-alpha.2status().MigrationDirtyInfovjs onlyv0.0.0-alpha.2status().MigrationStatusvjs onlyv0.0.0-alpha.2status().PlannedMigrationStepvjs onlyv0.0.0-alpha.2MigrationPlan.MigrationPlanvjs onlyv0.0.0-alpha.2plan().MigrationSummaryvjs onlyv0.0.0-alpha.2MigrationApplyResultvjs onlyv0.0.0-alpha.2up() or down().MigrationVerifyResultvjs onlyv0.0.0-alpha.2verify().MigrationErrorCodevjs onlyv0.0.0-alpha.2DbError.code by vael:db/migrate operations.MigrationTargetvjs onlyv0.0.0-alpha.2vael:db/migrate operations: an open Database handle, a DbConfig object, or a DSN string (sqlite:...MigrationFormatvjs onlyv0.0.0-alpha.2MigrationDirectionvjs onlyv0.0.0-alpha.2Functions
Section titled “Functions”loadMigrations
Section titled “loadMigrations”export function loadMigrations(
dir: string,
opts?: LoadMigrationsOptions,
): Promise<readonly LoadedMigration[]>;
Load and validate SQL migrations from a local directory.
| Name | Type | Description |
|---|---|---|
dir | string | Path to the migrations directory. |
opts optional | LoadMigrationsOptions | Optional binding, baseline, and dialect options. |
Promise<readonly LoadedMigration[]> — Frozen array of validated LoadedMigration objects sorted by version.DbError— ("MIGRATION_INVALID","IO","INVALID_PARAM") on invalid files or bounds.
status
Section titled “status”export function status(
target: MigrationTarget,
migrations: string | readonly LoadedMigration[],
opts?: MigrateOptions,
): Promise<MigrationStatus>;
Inspect applied, pending, drift, and dirty state without creating or modifying ledger tables.
| Name | Type | Description |
|---|---|---|
target | MigrationTarget | Open Database handle, DbConfig object, or DSN string. |
migrations | string | readonly LoadedMigration[] | Directory path or pre-loaded LoadedMigration[]. |
opts optional | MigrateOptions | Optional ledger, schema, module, and binding configuration. |
Promise<MigrationStatus> — Read-only migration status snapshot.export function plan(
target: MigrationTarget,
migrations: string | readonly LoadedMigration[],
opts?: MigratePlanOptions,
): Promise<MigrationPlan>;
Validate history and render planned up or down steps without executing writes.
| Name | Type | Description |
|---|---|---|
target | MigrationTarget | Open Database handle, DbConfig object, or DSN string. |
migrations | string | readonly LoadedMigration[] | Directory path or pre-loaded LoadedMigration[]. |
opts optional | MigratePlanOptions | Optional direction ("up" | "down"), step, to, and ledger options. |
Promise<MigrationPlan> — Ordered dry-run plan.export function up(
target: MigrationTarget,
migrations: string | readonly LoadedMigration[],
opts?: MigrateUpOptions,
): Promise<MigrationApplyResult>;
Apply pending up migrations (all, --step, or --to) atomically where supported.
| Name | Type | Description |
|---|---|---|
target | MigrationTarget | Open Database handle, DbConfig object, or DSN string. |
migrations | string | readonly LoadedMigration[] | Directory path or pre-loaded LoadedMigration[]. |
opts optional | MigrateUpOptions | Optional step, to, and ledger configuration. |
Promise<MigrationApplyResult> — Applied migration summary.export function down(
target: MigrationTarget,
migrations: string | readonly LoadedMigration[],
opts?: MigrateDownOptions,
): Promise<MigrationApplyResult>;
Revert applied migrations (defaults to step: 1; never rolls back all implicitly).
| Name | Type | Description |
|---|---|---|
target | MigrationTarget | Open Database handle, DbConfig object, or DSN string. |
migrations | string | readonly LoadedMigration[] | Directory path or pre-loaded LoadedMigration[]. |
opts optional | MigrateDownOptions | Optional step, to, and ledger configuration. |
Promise<MigrationApplyResult> — Reverted migration summary.verify
Section titled “verify”export function verify(
migrations: string | readonly LoadedMigration[],
target?: MigrationTarget | null,
opts?: MigrateOptions,
): Promise<MigrationVerifyResult>;
Verify local migration files and optionally verify consistency with a target database ledger.
| Name | Type | Description |
|---|---|---|
migrations | string | readonly LoadedMigration[] | Directory path or pre-loaded LoadedMigration[]. |
target optional | MigrationTarget | null | Optional Database handle, DbConfig object, or DSN string. |
opts optional | MigrateOptions | Optional ledger, schema, module, and binding configuration. |
Promise<MigrationVerifyResult> — Verification summary; throws DbError on drift, dirty state, or invalid files.reconcile
Section titled “reconcile”export function reconcile(target: MigrationTarget, opts: ReconcileOptions): Promise<void>;
Clear a dirty migration marker on MySQL or MariaDB after manual operator inspection.
| Name | Type | Description |
|---|---|---|
target | MigrationTarget | Open Database handle, DbConfig object, or DSN string. |
opts | ReconcileOptions | Migration set, operator-verified outcome, and ledger options. |
Promise<void>DbError— ("UNSUPPORTED") on SQLite, PostgreSQL, and SQL Server.
flatten
Section titled “flatten”export function flatten(target: MigrationTarget, manifest: FlattenOptions): Promise<void>;
Replace an exact applied legacy history with an irreversible baseline on SQLite or PostgreSQL.
| Name | Type | Description |
|---|---|---|
target | MigrationTarget | Open Database handle, DbConfig object, or DSN string. |
manifest | FlattenOptions | Legacy migrations, baseline file or definition, and ledger options. |
Promise<void>DbError— ("UNSUPPORTED") on MySQL, MariaDB, and SQL Server.
Interfaces
Section titled “Interfaces”MigrationDatabase
Section titled “MigrationDatabase”export interface MigrationDatabase {
readonly dialect: import("vael:db").DbDialect;
close(): Promise<void>;
}
Narrow structural database handle satisfied by any Database<DB>
regardless of schema generic parameter DB.
| Property | Type | Description | Since |
|---|---|---|---|
dialect readonly | import("vael:db").DbDialect | Native SQL dialect of this handle. | v0.0.0-alpha.2 |
MigrationDatabase.close
Section titled “MigrationDatabase.close”close(): Promise<void>;
Close the database pool handle.
Promise<void>LoadedMigration
Section titled “LoadedMigration”export interface LoadedMigration {
readonly version: number;
readonly name: string;
readonly checksum: string;
readonly hasDown: boolean;
readonly baseline: boolean;
readonly format: MigrationFormat;
readonly upSql: string;
readonly downSql: string | null;
readonly boundDriver: import("vael:db").DbDialect | null;
}
Validated migration definition returned by loadMigrations().
| Property | Type | Description | Since |
|---|---|---|---|
version readonly | number | Positive integer version (>= 1). | v0.0.0-alpha.2 |
name readonly | string | Migration name suffix from the filename. | v0.0.0-alpha.2 |
checksum readonly | string | SHA-256 checksum domain-tagged by neotales-migration-v1. | v0.0.0-alpha.2 |
hasDown readonly | boolean | Whether a down migration script is present. | v0.0.0-alpha.2 |
baseline readonly | boolean | Whether this migration is marked as an irreversible flatten baseline. | v0.0.0-alpha.2 |
format readonly | MigrationFormat | Authoring format ("paired" or "single"). | v0.0.0-alpha.2 |
upSql readonly | string | Up SQL text. | v0.0.0-alpha.2 |
downSql readonly | string | null | Down SQL text, or null when irreversible. | v0.0.0-alpha.2 |
boundDriver readonly | import("vael:db").DbDialect | null | Dialect for which identifier bindings have already been applied, or null. | v0.0.0-alpha.2 |
LoadMigrationsOptions
Section titled “LoadMigrationsOptions”export interface LoadMigrationsOptions {
readonly bindings?: Readonly<Record<string, string>>;
readonly baselineVersion?: number;
readonly dialect?: import("vael:db").DbDialect;
}
Options for loadMigrations().
| Property | Type | Description | Since |
|---|---|---|---|
bindings readonly optional | Readonly<Record<string, string>> | Identifier bindings ({{key}} -> lowercase SQL identifier). | v0.0.0-alpha.2 |
baselineVersion readonly optional | number | Optional version number to mark as an irreversible baseline. | v0.0.0-alpha.2 |
dialect readonly optional | import("vael:db").DbDialect | Optional target dialect to eagerly apply bindings and compute dialect checksums. | v0.0.0-alpha.2 |
MigrateOptions
Section titled “MigrateOptions”export interface MigrateOptions {
readonly table?: string;
readonly schema?: string;
readonly module?: string;
readonly lockTimeoutMs?: number;
readonly managedObjects?: readonly string[];
readonly bindings?: Readonly<Record<string, string>>;
readonly baselineVersion?: number;
}
Common ledger and binding options shared by migration operations.
| Property | Type | Description | Since |
|---|---|---|---|
table readonly optional | string | Ledger table name ([a-z_][a-z0-9_]*, defaults to "_vael_migrations"). | v0.0.0-alpha.2 |
schema readonly optional | string | Target schema for PostgreSQL ("public") or SQL Server ("dbo"). | v0.0.0-alpha.2 |
module readonly optional | string | Logical module identity in multi-module ledgers (defaults to "app"). | v0.0.0-alpha.2 |
lockTimeoutMs readonly optional | number | Advisory/application lock wait timeout in milliseconds (defaults to 30000). | v0.0.0-alpha.2 |
managedObjects readonly optional | readonly string[] | Application objects rejected if already present on unregistered first run. | v0.0.0-alpha.2 |
bindings readonly optional | Readonly<Record<string, string>> | Identifier placeholder bindings ({{key}} -> lowercase SQL identifier). | v0.0.0-alpha.2 |
baselineVersion readonly optional | number | Optional version number to mark as an irreversible baseline. | v0.0.0-alpha.2 |
MigratePlanOptions
Section titled “MigratePlanOptions”export interface MigratePlanOptions extends MigrateOptions {
readonly direction?: MigrationDirection;
readonly step?: number;
readonly to?: number;
}
Options for dry-run plan().
| Property | Type | Description | Since |
|---|---|---|---|
direction readonly optional | MigrationDirection | Direction to plan ("up" or "down", defaults to "up"). | v0.0.0-alpha.2 |
step readonly optional | number | Maximum number of migrations to include (>= 1). | v0.0.0-alpha.2 |
to readonly optional | number | Target migration version to plan up or down to. | v0.0.0-alpha.2 |
MigrateUpOptions
Section titled “MigrateUpOptions”export interface MigrateUpOptions extends MigrateOptions {
readonly step?: number;
readonly to?: number;
}
Options for up().
| Property | Type | Description | Since |
|---|---|---|---|
step readonly optional | number | Maximum number of pending migrations to apply (>= 1). | v0.0.0-alpha.2 |
to readonly optional | number | Inclusive target migration version to apply up to. | v0.0.0-alpha.2 |
MigrateDownOptions
Section titled “MigrateDownOptions”export interface MigrateDownOptions extends MigrateOptions {
readonly step?: number;
readonly to?: number;
}
Options for down().
| Property | Type | Description | Since |
|---|---|---|---|
step readonly optional | number | Number of applied migrations to revert (>= 1, defaults to 1). | v0.0.0-alpha.2 |
to readonly optional | number | Target version to revert down to (0 reverts all non-baseline migrations). | v0.0.0-alpha.2 |
ReconcileOptions
Section titled “ReconcileOptions”export interface ReconcileOptions extends MigrateOptions {
readonly migrations: string | readonly LoadedMigration[];
readonly outcome: "applied" | "reverted" | "notApplied";
}
Options for reconcile() on MySQL/MariaDB dirty ledgers.
| Property | Type | Description | Since |
|---|---|---|---|
migrations readonly | string | readonly LoadedMigration[] | Local migration directory path or pre-loaded migrations. | v0.0.0-alpha.2 |
outcome readonly | "applied" | "reverted" | "notApplied" | Operator-verified outcome of the interrupted script. | v0.0.0-alpha.2 |
FlattenOptions
Section titled “FlattenOptions”export interface FlattenOptions extends MigrateOptions {
readonly migrations?: string | readonly LoadedMigration[];
readonly legacy?: string | readonly LoadedMigration[];
readonly legacyMaxVersion?: number;
readonly baseline: string | LoadedMigration;
}
Options for flatten() on SQLite and PostgreSQL.
| Property | Type | Description | Since |
|---|---|---|---|
migrations readonly optional | string | readonly LoadedMigration[] | Legacy migration directory path or pre-loaded migrations. | v0.0.0-alpha.2 |
legacy readonly optional | string | readonly LoadedMigration[] | Alias for migrations. | v0.0.0-alpha.2 |
legacyMaxVersion readonly optional | number | Optional inclusive max version when migrations also contains newer files. | v0.0.0-alpha.2 |
baseline readonly | string | LoadedMigration | Baseline SQL file path or pre-loaded baseline migration. | v0.0.0-alpha.2 |
AppliedMigrationInfo
Section titled “AppliedMigrationInfo”export interface AppliedMigrationInfo {
readonly version: number;
readonly name: string | null;
readonly checksum: string;
}
Applied migration entry reported in MigrationStatus.
| Property | Type | Description | Since |
|---|---|---|---|
version readonly | number | Applied migration version. | v0.0.0-alpha.2 |
name readonly | string | null | Local migration name if present locally, else null. | v0.0.0-alpha.2 |
checksum readonly | string | Recorded SHA-256 checksum. | v0.0.0-alpha.2 |
PendingMigrationInfo
Section titled “PendingMigrationInfo”export interface PendingMigrationInfo {
readonly version: number;
readonly name: string;
readonly checksum: string;
readonly hasDown: boolean;
readonly baseline: boolean;
}
Pending migration entry reported in MigrationStatus.
| Property | Type | Description | Since |
|---|---|---|---|
version readonly | number | Pending migration version. | v0.0.0-alpha.2 |
name readonly | string | Migration name. | v0.0.0-alpha.2 |
checksum readonly | string | Expected SHA-256 checksum. | v0.0.0-alpha.2 |
hasDown readonly | boolean | Whether down SQL is present. | v0.0.0-alpha.2 |
baseline readonly | boolean | Whether marked as a flatten baseline. | v0.0.0-alpha.2 |
MigrationDriftInfo
Section titled “MigrationDriftInfo”export interface MigrationDriftInfo {
readonly kind: string;
readonly message: string;
}
Redacted drift summary reported by status().
| Property | Type | Description | Since |
|---|---|---|---|
kind readonly | string | Machine-readable drift kind ("modified", "history_drift", etc.). | v0.0.0-alpha.2 |
message readonly | string | Redacted drift description. | v0.0.0-alpha.2 |
MigrationDirtyInfo
Section titled “MigrationDirtyInfo”export interface MigrationDirtyInfo {
readonly direction: MigrationDirection;
readonly stage: string;
readonly version: number;
readonly checksum: string;
}
MySQL/MariaDB dirty-ledger marker surfaced by status().
| Property | Type | Description | Since |
|---|---|---|---|
direction readonly | MigrationDirection | Direction of the interrupted operation. | v0.0.0-alpha.2 |
stage readonly | string | Last persisted stage ("started", "script_done", or "script_failed"). | v0.0.0-alpha.2 |
version readonly | number | Migration version being processed when interrupted. | v0.0.0-alpha.2 |
checksum readonly | string | Expected SHA-256 checksum. | v0.0.0-alpha.2 |
MigrationStatus
Section titled “MigrationStatus”export interface MigrationStatus {
readonly driver: import("vael:db").DbDialect;
readonly module: string;
readonly table: string;
readonly initialized: boolean;
readonly healthy: boolean;
readonly currentVersion: number | null;
readonly bindingFingerprint: string;
readonly applied: readonly AppliedMigrationInfo[];
readonly pending: readonly PendingMigrationInfo[];
readonly drift: MigrationDriftInfo | null;
readonly dirty: MigrationDirtyInfo | null;
}
Result of read-only status().
| Property | Type | Description | Since |
|---|---|---|---|
driver readonly | import("vael:db").DbDialect | Target database dialect. | v0.0.0-alpha.2 |
module readonly | string | Module identity. | v0.0.0-alpha.2 |
table readonly | string | Ledger table name. | v0.0.0-alpha.2 |
initialized readonly | boolean | Whether ledger tables exist and the module is registered. | v0.0.0-alpha.2 |
healthy readonly | boolean | true when there is neither drift nor a dirty marker. | v0.0.0-alpha.2 |
currentVersion readonly | number | null | Highest applied migration version, or null. | v0.0.0-alpha.2 |
bindingFingerprint readonly | string | Binding fingerprint for the target dialect and bindings. | v0.0.0-alpha.2 |
applied readonly | readonly AppliedMigrationInfo[] | Applied migrations recorded in the ledger. | v0.0.0-alpha.2 |
pending readonly | readonly PendingMigrationInfo[] | Local migrations not yet applied. | v0.0.0-alpha.2 |
drift readonly | MigrationDriftInfo | null | Drift information if local definitions disagree with the ledger, else null. | v0.0.0-alpha.2 |
dirty readonly | MigrationDirtyInfo | null | Dirty marker on MySQL/MariaDB if reconciliation is required, else null. | v0.0.0-alpha.2 |
PlannedMigrationStep
Section titled “PlannedMigrationStep”export interface PlannedMigrationStep {
readonly version: number;
readonly name: string;
readonly checksum: string;
readonly sql: string;
readonly batches?: readonly string[];
}
One planned step in MigrationPlan.
| Property | Type | Description | Since |
|---|---|---|---|
version readonly | number | Migration version. | v0.0.0-alpha.2 |
name readonly | string | Migration name. | v0.0.0-alpha.2 |
checksum readonly | string | Migration SHA-256 checksum. | v0.0.0-alpha.2 |
sql readonly | string | Dialect-bound SQL script for this step. | v0.0.0-alpha.2 |
batches readonly optional | readonly string[] | For SQL Server, pre-split GO batches. | v0.0.0-alpha.2 |
MigrationPlan
Section titled “MigrationPlan”export interface MigrationPlan {
readonly driver: import("vael:db").DbDialect;
readonly direction: MigrationDirection;
readonly currentVersion: number | null;
readonly targetVersion: number | null;
readonly steps: readonly PlannedMigrationStep[];
}
Result of read-only dry-run plan().
| Property | Type | Description | Since |
|---|---|---|---|
driver readonly | import("vael:db").DbDialect | Target database dialect. | v0.0.0-alpha.2 |
direction readonly | MigrationDirection | Planned direction. | v0.0.0-alpha.2 |
currentVersion readonly | number | null | Current applied head version before the plan, or null. | v0.0.0-alpha.2 |
targetVersion readonly | number | null | Projected head version after executing the plan, or null. | v0.0.0-alpha.2 |
steps readonly | readonly PlannedMigrationStep[] | Ordered steps that would execute. | v0.0.0-alpha.2 |
MigrationSummary
Section titled “MigrationSummary”export interface MigrationSummary {
readonly version: number;
readonly name: string;
readonly checksum: string;
}
Summary of one applied or reverted migration.
| Property | Type | Description | Since |
|---|---|---|---|
version readonly | number | Migration version. | v0.0.0-alpha.2 |
name readonly | string | Migration name. | v0.0.0-alpha.2 |
checksum readonly | string | Migration SHA-256 checksum. | v0.0.0-alpha.2 |
MigrationApplyResult
Section titled “MigrationApplyResult”export interface MigrationApplyResult {
readonly driver: import("vael:db").DbDialect;
readonly direction: MigrationDirection;
readonly applied: readonly MigrationSummary[];
readonly currentVersion: number | null;
readonly appliedCount: number;
}
Result of up() or down().
| Property | Type | Description | Since |
|---|---|---|---|
driver readonly | import("vael:db").DbDialect | Target database dialect. | v0.0.0-alpha.2 |
direction readonly | MigrationDirection | Applied direction ("up" or "down"). | v0.0.0-alpha.2 |
applied readonly | readonly MigrationSummary[] | Migrations applied (for up) or reverted (for down). | v0.0.0-alpha.2 |
currentVersion readonly | number | null | Current applied head version after the operation, or null. | v0.0.0-alpha.2 |
appliedCount readonly | number | Total number of applied migrations remaining in the ledger. | v0.0.0-alpha.2 |
MigrationVerifyResult
Section titled “MigrationVerifyResult”export interface MigrationVerifyResult {
readonly valid: boolean;
readonly driver: import("vael:db").DbDialect | null;
readonly localCount: number;
readonly appliedCount: number;
readonly pendingCount: number;
readonly bindingFingerprint: string;
}
Result of verify().
| Property | Type | Description | Since |
|---|---|---|---|
valid readonly | boolean | Always true when verification succeeds (throws DbError on failure). | v0.0.0-alpha.2 |
driver readonly | import("vael:db").DbDialect | null | Target dialect when verified against a database, or null when offline. | v0.0.0-alpha.2 |
localCount readonly | number | Total number of local migrations validated. | v0.0.0-alpha.2 |
appliedCount readonly | number | Number of applied migrations in the target ledger (0 when offline). | v0.0.0-alpha.2 |
pendingCount readonly | number | Number of pending migrations. | v0.0.0-alpha.2 |
bindingFingerprint readonly | string | Binding fingerprint for the validated migration set. | v0.0.0-alpha.2 |
Type Aliases
Section titled “Type Aliases”MigrationErrorCode
Section titled “MigrationErrorCode”export type MigrationErrorCode =
| import("vael:db").DbErrorCode
| "MIGRATION_INVALID"
| "MIGRATION_DRIFT"
| "MIGRATION_DIRTY"
| "MIGRATION_MISSING_DOWN"
| "MIGRATION_BASELINE"
| "MIGRATION_UNTRACKED_OBJECTS"
| "MIGRATION_UNREGISTERED"
| "MIGRATION_NOT_DIRTY"
| "MIGRATION_LOCK_TIMEOUT"
| "UNSUPPORTED"
| "IO";
Error codes thrown on DbError.code by vael:db/migrate operations.
MigrationTarget
Section titled “MigrationTarget”export type MigrationTarget =
| MigrationDatabase
| import("vael:db").DbConfig
| string;
Database target accepted by vael:db/migrate operations: an open
Database handle, a DbConfig object, or a DSN string (sqlite:,
postgres://, mysql://, mariadb://, mssql://).
MigrationFormat
Section titled “MigrationFormat”export type MigrationFormat = "paired" | "single";
File authoring format of a loaded migration.
MigrationDirection
Section titled “MigrationDirection”export type MigrationDirection = "up" | "down";
Direction of a migration plan or apply result.
Constants
Section titled “Constants”DbError
Section titled “DbError”export const DbError: typeof import("vael:db").DbError;
Re-exported DbError constructor shared with vael:db.
