SqliteMigrator.ts
SqliteMigrator.ts overview
Section titled “SqliteMigrator.ts overview”Runs database migrations for Node.js SQLite projects that use Effect SQL.
This module re-exports the shared migration loaders and errors, then provides
run and layer helpers that apply pending migration files with the current
SqlClient. It does not add Node-specific schema dump support; migration
execution is handled by the shared SQL migrator.
Since v4.0.0
Exports Grouped by Category
Section titled “Exports Grouped by Category”constructors
Section titled “constructors”Creates a layer that runs the configured SQLite migrations during layer construction and provides no services.
Signature
declare const layer: <R>( options: Migrator.MigratorOptions<R>) => Layer.Layer<never, Migrator.MigrationError | SqlError, Client.SqlClient | R>Since v4.0.0
Runs SQL migrations for a SQLite database using the shared Migrator implementation and the current SqlClient.
Signature
declare const run: <R2 = never>( options: Migrator.MigratorOptions<R2>) => Effect.Effect< ReadonlyArray<readonly [id: number, name: string]>, Migrator.MigrationError | SqlError, Client.SqlClient | R2>Since v4.0.0
“effect/unstable/sql/Migrator” (namespace export)
Section titled ““effect/unstable/sql/Migrator” (namespace export)”Re-exports all named exports from the “effect/unstable/sql/Migrator” module.
Signature
export * from "effect/unstable/sql/Migrator"Since v4.0.0