HomeSoftware Heritage

storage: metadata_provider: Ensure idempotency when creating provider

Description

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 new unique primary key
on (provider_type, provider_url).

This is preparatory work to allow a smooth transition for D2988 (which will
need to be rebased).

Related to T2075