MssqlMigrator.ts
MssqlMigrator.ts overview
Section titled “MssqlMigrator.ts overview”Utilities for applying Effect SQL migrations to Microsoft SQL Server.
This module re-exports the shared Migrator loaders and error types, then
provides run and layer helpers for applying ordered migrations through
the current SQL Server SqlClient. run returns the applied migration IDs
and names, while layer runs migrations during layer construction and
provides no services.
Since v4.0.0
Exports Grouped by Category
Section titled “Exports Grouped by Category”constructors
Section titled “constructors”Runs SQL migrations using the configured SqlClient, returning the migrations that were applied.
Signature
declare const run: <R>( options: Migrator.MigratorOptions<R>) => Effect.Effect< ReadonlyArray<readonly [id: number, name: string]>, SqlError | Migrator.MigrationError, Client.SqlClient | R>Since v4.0.0
layers
Section titled “layers”Creates a layer that runs the configured SQL migrations during layer construction.
Signature
declare const layer: <R>( options: Migrator.MigratorOptions<R>) => Layer.Layer<never, SqlError | Migrator.MigrationError, Client.SqlClient | R>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