hydromodpy.core.migrations.runner#
Alembic-like migration runner generic over DuckDB databases.
The runner discovers <NNNN>_<slug>.sql scripts under versions_dir,
records each application in schema_migrations and keeps one row of
_schema_version per component in sync. It is idempotent: rerunning
ensure_schema() on an up-to-date database applies nothing and only
verifies checksum integrity.
The same runner serves multiple components by parametrizing
component (e.g. "catalog" for project catalogs, "index" for
the machine-wide global index).
Functions
|
Apply one migration in a transaction and record it for |
|
Open |
|
Return the highest applied version for |
|
Return migrations sorted by version, rejecting gaps and duplicates. |
|
Bring |
|
Public alias for |
|
Return the highest migration version present on disk. |