sa: Improve paused table schema (#7656)

* 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
This commit is contained in:
Phil Porada 2024-08-09 15:10:26 -04:00 committed by GitHub
parent 28f09341b9
commit 5c4ad1198f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -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