cli/db: Make the db init process a bit more (config) error resilient
We used to run all the sql init scripts before trying to determine the backend's version, only to gather this piece of information at time we want to write it in the dbversion table. However, the presence of the dbversion is actually used to determine whether a db has been initialized or not. So if the configuration for the backend prevent it from being instantiated, which is done to retrieve the backend version, then this last initialization step will fail preventing any future 'swh db' handling operation from working properly. In this change, we move the backend version identification logic before attempting any actual db initialization process so this situation does not occur.
parent
ce0d4b72
No related branches found
No related tags found