Skip to content

Commit

Permalink
sa: Improve paused table schema (#7656)
Browse files Browse the repository at this point in the history
* Make `registrationID` unsigned to match staging/production so that we
have a large pool of autoincrement IDs
* Change the primary key line to perform better filtering to appease the
query planner
  • Loading branch information
pgporada authored Aug 9, 2024
1 parent 28f0934 commit 5c4ad11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sa/db-next/boulder_sa/20240514000000_Paused.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
-- rate of ~18% per year.

CREATE TABLE `paused` (
`registrationID` bigint(20) NOT NULL,
`registrationID` bigint(20) UNSIGNED NOT NULL,
`identifierType` tinyint(4) NOT NULL,
`identifierValue` varchar(255) NOT NULL,
`pausedAt` datetime NOT NULL,
`unpausedAt` datetime DEFAULT NULL,
PRIMARY KEY (`registrationID`, `identifierType`, `identifierValue`)
PRIMARY KEY (`registrationID`, `identifierValue`, `identifierType`)
);

-- +migrate Down
Expand Down

0 comments on commit 5c4ad11

Please sign in to comment.