Don't overwrite information in gitlab_subscriptions for GitLab.com subscription changes
Overview
We currently store information on GitLab.com subscriptions/trials in the gitlab_subscriptions table. This is useful information, as it helps us analyze which groups are transitioning from plan to plan.
However, it looks like this information is being overwritten on plan changes. When a namespace changes from Free to Trial to Silver to Free, we currently rewrite the same id row for these changes. As a result, the dates of these transitions are lost.
Proposal
- Instead of overwriting each change, append a new row to
gitlab_subscriptionson everyplan_idchange for a namespace.
cc @valexieva