I have no idea why both exist. But this centralized one (current_version) is declared on
most swh modules vs the other method which is not [2]
[1]
$SWH_ENVIRONMENT_HOME/swh-indexer/swh/indexer/storage/db.py: current_version = 133 $SWH_ENVIRONMENT_HOME/swh-scheduler/swh/scheduler/backend.py: current_version = 33 $SWH_ENVIRONMENT_HOME/swh-scrubber/swh/scrubber/db.py: current_version = 2 $SWH_ENVIRONMENT_HOME/swh-storage/swh/storage/postgresql/db.py: current_version = 182 $SWH_ENVIRONMENT_HOME/swh-vault/swh/vault/backend.py: current_version = 4
[2]
grep -r "get_current_version(" $SWH_ENVIRONMENT_HOME/*/swh/ $SWH_ENVIRONMENT_HOME/swh-indexer/swh/indexer/storage/__init__.py: def get_current_version(self, *, db=None, cur=None): $SWH_ENVIRONMENT_HOME/swh-scheduler/swh/scheduler/backend.py: def get_current_version(self): $SWH_ENVIRONMENT_HOME/swh-storage/swh/storage/postgresql/storage.py: def get_current_version(self, *, db: Db, cur=None):