storage: metadata_provider: Ensure idempotency when creating provider
Currently, in production, we have duplicated entries in origin_metadata and metadata_provider.
This is due to a bad primary key on metadata_provider. This commit ensures uniqueness when adding new metadata_provider by adding a unique primary key on (provider_type, provider_url).
This is preparatory work to allow a smooth transition for !829 (closed) (which will need to be rebased).
Related to #2075 (closed)
Test Plan
tox
Migrated from D3159 (view on Phabricator)