WIP: Prevent adding repository without code host details
Created by: asdine
This PR detects repositories containing incorrect code host details (i.e. missing external repo id, see https://github.com/sourcegraph/sourcegraph/issues/14907) before they are inserted in the database.
It ensures all repos returned by sources are valid before synchronizing them.
It also adds NOT NULL constraints to the external_id
, external_service
and external_service_type
columns of the repo
table.