[Data Integrity Issue] Lacking unique index on the `namespace_id` column in the `gitlab_subscriptions` table
The following discussion from !40537 (merged) should be addressed:
-
@dosuken123 started a discussion: (+3 comments) Does it make sense to add a test that duplicate
gitlab_subscriptions are not created? So that we can prevent the further regression when the other developer removed theupdate_only?When do we insert the first
gitlab_subscriptionrecord when a new namespace is created? Does it still work with theupdate_only: trueoption?Also, it looks like
NamespaceandGitlabSubscriptionis 1-to-1 relationship. Why don't we have a unique index on the database-level for ensuring the data integrity?