Skip to content
Snippets Groups Projects
Commit 7e07b1f3 authored by David Douard's avatar David Douard
Browse files

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.
parent f8a07dfa
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment