User-Item table is replaced

This commit is contained in:
Michael 2021-02-02 05:45:57 +00:00
parent b26157e6e3
commit df24c0daeb
8 changed files with 367 additions and 418 deletions

View file

@ -1462,23 +1462,6 @@ CREATE TABLE IF NOT EXISTS `user-contact` (
FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='User specific public contact data';
--
-- TABLE user-item
--
CREATE TABLE IF NOT EXISTS `user-item` (
`iid` int unsigned NOT NULL DEFAULT 0 COMMENT 'Item id',
`uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id',
`hidden` boolean NOT NULL DEFAULT '0' COMMENT 'Marker to hide an item from the user',
`ignored` boolean COMMENT 'Ignore this thread if set',
`pinned` boolean COMMENT 'The item is pinned on the profile page',
`notification-type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '',
PRIMARY KEY(`uid`,`iid`),
INDEX `uid_pinned` (`uid`,`pinned`),
INDEX `iid_uid` (`iid`,`uid`),
FOREIGN KEY (`iid`) REFERENCES `item` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE,
FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='User specific item data';
--
-- TABLE worker-ipc
--