Migrations for SQLite (Effect's @effect/sql-sqlite-node
SqliteMigrator): Migrator's runner, without a schema dump.
Re-exports#
- From
pyfect.sql.error:SqlError - From
pyfect.sql.migrator:from_record,Loader,MigrationError - From
pyfect.sql.migrator_file_system:from_file_system
Values#
| Attribute | Type | Description |
|---|---|---|
run | Runner[Never] | Run the new migrations of |
Functions#
layer#
layer[R = Never](*, loader, schema_directory=None, table='effect_sql_migrations') -> Layer[Never, MigrationError | SqlError, SqlClient | R]Runs the migrations when built.
| Parameter | Type | Description |
|---|---|---|
loader | Loader[R] | |
schema_directory | str | None = None | |
table | str = '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))