Skip to content

trulens.core.database.migrations.data

trulens.core.database.migrations.data

Attributes

sql_alchemy_migration_versions module-attribute

sql_alchemy_migration_versions: List[int] = [1, 2, 3]

DB versions.

sqlalchemy_upgrade_paths module-attribute

sqlalchemy_upgrade_paths: Dict[
    int, Tuple[int, Callable[[DB]]]
] = {}

A DAG of upgrade functions to get to most recent DB.

Classes

Functions

data_migrate

data_migrate(db: DB, from_version: Optional[str])

Makes any data changes needed for upgrading from the from_version to the current version.

PARAMETER DESCRIPTION
db

The database instance.

TYPE: DB

from_version

The version to migrate data from.

TYPE: Optional[str]

RAISES DESCRIPTION
VersionException

Can raise a migration or validation upgrade error.