Changed index for the categories
This commit is contained in:
parent
2a4b5b4cb4
commit
ab42fd88a4
|
@ -1071,8 +1071,8 @@ CREATE TABLE IF NOT EXISTS `post-category` (
|
||||||
`type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '',
|
`type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '',
|
||||||
`tid` int unsigned NOT NULL DEFAULT 0 COMMENT '',
|
`tid` int unsigned NOT NULL DEFAULT 0 COMMENT '',
|
||||||
PRIMARY KEY(`uri-id`,`uid`,`type`,`tid`),
|
PRIMARY KEY(`uri-id`,`uid`,`type`,`tid`),
|
||||||
INDEX `uri-id` (`tid`),
|
INDEX `tid` (`tid`),
|
||||||
INDEX `uid` (`uid`),
|
INDEX `uid_uri-id` (`uid`,`uri-id`),
|
||||||
FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE,
|
FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE,
|
||||||
FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE,
|
FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE,
|
||||||
FOREIGN KEY (`tid`) REFERENCES `tag` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT
|
FOREIGN KEY (`tid`) REFERENCES `tag` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT
|
||||||
|
|
|
@ -17,10 +17,10 @@ Indexes
|
||||||
------------
|
------------
|
||||||
|
|
||||||
| Name | Fields |
|
| Name | Fields |
|
||||||
| ------- | ---------------------- |
|
| ---------- | ---------------------- |
|
||||||
| PRIMARY | uri-id, uid, type, tid |
|
| PRIMARY | uri-id, uid, type, tid |
|
||||||
| uri-id | tid |
|
| tid | tid |
|
||||||
| uid | uid |
|
| uid_uri-id | uid, uri-id |
|
||||||
|
|
||||||
Foreign Keys
|
Foreign Keys
|
||||||
------------
|
------------
|
||||||
|
|
|
@ -1114,8 +1114,8 @@ return [
|
||||||
],
|
],
|
||||||
"indexes" => [
|
"indexes" => [
|
||||||
"PRIMARY" => ["uri-id", "uid", "type", "tid"],
|
"PRIMARY" => ["uri-id", "uid", "type", "tid"],
|
||||||
"uri-id" => ["tid"],
|
"tid" => ["tid"],
|
||||||
"uid" => ["uid"],
|
"uid_uri-id" => ["uid", "uri-id"],
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"post-collection" => [
|
"post-collection" => [
|
||||||
|
|
Loading…
Reference in a new issue