ClickhouseMigrator.ts
ClickhouseMigrator.ts overview
Section titled “ClickhouseMigrator.ts overview”ClickHouse adapter for the shared Effect SQL migration runner.
This module re-exports the common Migrator loaders and error types, then
provides run and layer helpers that apply ordered migrations through the
current ClickHouse SqlClient. run returns the applied migration IDs and
names, while layer runs the 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 for ClickHouse using the supplied migrator options and returns the applied migration IDs and names.
Signature
declare const run: <R2 = never>({ loader, schemaDirectory, table}: Migrator.MigratorOptions<R2>) => Effect.Effect< ReadonlyArray<readonly [id: number, name: string]>, Migrator.MigrationError | SqlError, Client.SqlClient | R2>Since v4.0.0
layers
Section titled “layers”Creates a layer that runs the configured ClickHouse 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
“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