Skip to main content

check_database_version

Function check_database_version 

Source
async fn check_database_version(
    services: &Services,
    foreign_lineage: bool,
) -> Result
Expand description

Gate the discovered schema version before migrations and the server_name backfill run. The integer is comparable only within tuwunel’s own lineage; a foreign database (Conduit and forks) numbers schema on a colliding ladder and is recognized as foreign by is_foreign_lineage, so its number is not gated. Within our lineage a version below 13 is refused as unmigratable and one above this build as too new to open safely; force_migration overrides the latter for a deliberate downgrade.