· 7 years ago · Mar 04, 2019, 05:54 PM
1alter table torrents_group add `LastCommentID` int(10) NOT NULL DEFAULT '0';
2
3alter table artists_group add `LastCommentID` int(10) NOT NULL DEFAULT '0';
4
5alter table users_info add `TorrentsCommentsCatchupTime` datetime DEFAULT NULL;
6
7alter table users_info add `ArtistsCommentsCatchupTime` datetime DEFAULT NULL;
8
9CREATE TABLE IF NOT EXISTS `users_comments_subscriptions` (
10 `UserID` int(10) NOT NULL,
11 `GroupID` int(10) NOT NULL,
12 PRIMARY KEY (`UserID`,`GroupID`),
13 KEY `GroupID` (`GroupID`)
14) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
15
16CREATE TABLE IF NOT EXISTS `torrents_last_read_comments` (
17 `UserID` int(10) NOT NULL,
18 `GroupID` int(10) NOT NULL,
19 `CommentID` int(10) NOT NULL,
20 PRIMARY KEY (`UserID`,`GroupID`),
21 KEY `GroupID` (`GroupID`)
22) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
23
24CREATE TABLE IF NOT EXISTS `users_artists_comments_subscriptions` (
25 `UserID` int(10) NOT NULL,
26 `ArtistID` int(10) NOT NULL,
27 PRIMARY KEY (`UserID`,`ArtistID`),
28 KEY `ArtistID` (`ArtistID`)
29) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
30
31CREATE TABLE IF NOT EXISTS `artists_last_read_comments` (
32 `UserID` int(10) NOT NULL,
33 `ArtistID` int(10) NOT NULL,
34 `CommentID` int(10) NOT NULL,
35 PRIMARY KEY (`UserID`,`ArtistID`),
36 KEY `ArtistID` (`ArtistID`)
37) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;