HomeSoftware Heritage

Make 'swh db init' fill the dbversion table

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Make 'swh db init' fill the dbversion table

for this feature to work properly, the backend datastore package must
provide the 'get_datastore' factory function in its root namespace and
the datastore instance must provide a 'get_current_version()' method.

This also means the canonical cli usage for the swh db init is now
using the config file (via --config-file or SWH_CONFIG_FILENAME)
instead of giving only the db cnx string (--db-name), so that the
backend datastore class can be instanciated using the get_datastore()
factory function.

However a '--initial-version' cli option has been added to 'swh db init'
to make it easier, especially for unit tests.

Details

Provenance
douarddaAuthored on Feb 1 2022, 2:51 PM
douarddaPushed on Feb 17 2022, 1:55 PM
Differential Revision
D7063: Make 'swh db init' fill the dbversion table
Tasks
T3894: Add a 'swh db upgrade' cli
Build Status
Buildable 26961
Build 42159: test-and-buildJenkins console · Jenkins

Commit No Longer Exists

This commit no longer exists in the repository.