There is currently a mismatch, causing for example project creation via
the web interface to fail, because the validation code is using the enum
keys, which are lowercase, but everything else uses uppercase.
Simply use uppercase everywhere, like already the case in other
services.
We add a unique constraint on source_repo table to prevent multiple
links of the same remote repository to a given project.
The UI already prevents duplicates (from ef585b6e) but it seems better
to enforce this in the database model.