Add sharding key to raw_usage_data table for Cells 1.0 compliance
Problem
Parent issue #434997 (closed)
Currently the only table we use (raw_usage_data) doesn't have sharding key. In order to comply with Cells 1.0 we need to add the key to the table docs.
However, the table is not in use on Gitlab.com since we don't generate service ping here. The last record was a year ago.
Desired Outcome
Sharding key exists for the table
Potential Solution
There is a complany-wide issue to track migration to sharding keys #429184 (closed).
Add organization_id to the table. Set the column value to Default organization for the existing rows (both SM and .com) and all the new records on SM.
Further actions needed
In the future we should consider moving ServicePing generation per organisation other than per instance
Edited by Niko Belokolodov