hydromodpy.core.migrations#
Generic Alembic-like schema migration runner shared by all DuckDB components.
The same runner serves multiple isolated components (catalog, global index,
workspace cache, …) by parametrizing component and versions_dir on
each call.
Public API#
ensure_schema(): bring a component up to the latest version.current_version(): highest applied version (0 if none).target_version(): highest version on disk.discover_migrations(): orderedMigrationrecords.Migration: Pydantic record for one migration file.Errors:
MigrationError,SchemaIntegrityError,MigrationDiscoveryError,MigrationExecutionError.
Modules