mozilla / mozilla/code-review

Move away from django sequence for pkeys in our DB

Open
#1,882 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
67
Forks
52
Avg merge
3d 23h
Merged PRs (30d)
54

Description

Our pkeys in our db use django sequences with pgsql, this works fine if you have a fairly small number of rows but since we populate on a daily bases our db with pre-existing defects we end up in having conflicts, where the same ID is generated twice so we should move to UUIDs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Django model primary-key definitions and PostgreSQL sequence usage described in the issue. Determine the migration scope and verify that populated pre-existing defects no longer produce duplicate IDs; done should mean the affected records use UUIDs without conflicts.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, postgresql, python
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.