Skip to content

Add and backfill a sharding_key to an existing small table

This issue will allow us to work out what the series of steps looks like to backfill a sharding key on a table that is missing it.

We should choose a table small enough so that we're not needing to deal with the complexities of backfilling at massive scale.

Possible tables

  1. packages_tags
  2. snippet_repositories
  3. user_achievements
  4. vulnerability_issue_links

Steps

  1. MR1 (%16.6): Add the column and start the migration !135451 (merged)
  2. MR2 (%16.7) !136792 (merged):
    1. Finalize the migration
    2. Validate the not-null constraint
Edited by Tiger Watson