1
0
Fork 0

Use a combined unique index

This commit is contained in:
Michael 2020-12-02 00:34:10 +00:00
commit b2dadf0f92
4 changed files with 9 additions and 9 deletions

View file

@ -470,7 +470,7 @@ CREATE TABLE IF NOT EXISTS `delayed-post` (
`uid` mediumint unsigned COMMENT 'Owner User id',
`delayed` datetime COMMENT 'delay time',
PRIMARY KEY(`id`),
UNIQUE INDEX `uri` (`uri`(190)),
UNIQUE INDEX `uid_uri` (`uid`,`uri`(190)),
FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Posts that are about to be posted at a later time';