GitHub

migrator

API reference for migrator.

Migrations for libSQL (Effect's @effect/sql-libsql LibsqlMigrator): Migrator's runner, without a schema dump.

Re-exports

Values

AttributeTypeDescription
runRunner[Never]

Run the new migrations of loader (see migrator.make).

Functions

layer

layer[R = Never](*, loader, schema_directory=None, table='effect_sql_migrations') -> Layer[Never, MigrationError | SqlError, SqlClient | R]

Runs the migrations when built.

ParameterTypeDescription
loaderLoader[R]
schema_directorystr | None = None
tablestr = 'effect_sql_migrations'

Returns Layer[Never, MigrationError | SqlError, SqlClient | R]

def layer[R = Never](
    *,
    loader: Loader[R],
    schema_directory: str | None = None,
    table: str = "effect_sql_migrations",
) -> Layer[Never, MigrationError | SqlError, SqlClient | R]:
    """Runs the migrations when built."""
    return layer_effect_discard(run(loader=loader, schema_directory=schema_directory, table=table))