Do not do call swh_db_upgrade if not needed in `swh db upgrade`
also fix a possible UnboundLocalError in swh_db_upgrade when no migration script is to be executed.
Migrated from D7324 (view on Phabricator)
Staging instance, all changes can be removed at any time
also fix a possible UnboundLocalError in swh_db_upgrade when no migration script is to be executed.
Migrated from D7324 (view on Phabricator)