X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=database.sql;h=1727911c93af61262e2ccf050691e406d72f4cb3;hb=aa678921216289df4c83f448f038bce7ead64eaf;hp=7e1d996eb4284c749aac33702f610b5733ac0659;hpb=470a47647a76f3dc0859ff9df65e000ea720333b;p=friendica.git diff --git a/database.sql b/database.sql index 7e1d996eb4..1727911c93 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ -- Friendica 2021.03-rc (Red Hot Poker) --- DB_UPDATE_VERSION 1408 +-- DB_UPDATE_VERSION 1413 -- ------------------------------------------ @@ -186,6 +186,7 @@ CREATE TABLE IF NOT EXISTS `contact` ( INDEX `blocked_uid` (`blocked`,`uid`), INDEX `uid_rel_network_poll` (`uid`,`rel`,`network`,`poll`(64),`archive`), INDEX `uid_network_batch` (`uid`,`network`,`batch`(64)), + INDEX `batch_contact-type` (`batch`(64),`contact-type`), INDEX `addr_uid` (`addr`(128),`uid`), INDEX `nurl_uid` (`nurl`(128),`uid`), INDEX `nick_uid` (`nick`(128),`uid`), @@ -196,6 +197,9 @@ CREATE TABLE IF NOT EXISTS `contact` ( INDEX `uid_network_self_lastupdate` (`uid`,`network`,`self`,`last-update`), INDEX `uid_lastitem` (`uid`,`last-item`), INDEX `baseurl` (`baseurl`(64)), + INDEX `uid_contact-type` (`uid`,`contact-type`), + INDEX `uid_self_contact-type` (`uid`,`self`,`contact-type`), + INDEX `self_network_uid` (`self`,`network`,`uid`), INDEX `gsid` (`gsid`), FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`gsid`) REFERENCES `gserver` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT @@ -930,7 +934,7 @@ CREATE TABLE IF NOT EXISTS `post` ( `owner-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Link to the contact table with uid=0 of the owner of this item', `author-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Link to the contact table with uid=0 of the author of this item', `causer-id` int unsigned COMMENT 'Link to the contact table with uid=0 of the contact that caused the item creation', - `post-type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Post type (personal note, bookmark, ...)', + `post-type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Post type (personal note, image, article, ...)', `vid` smallint unsigned COMMENT 'Id of the verb table entry that contains the activity verbs', `private` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '0=public, 1=private, 2=unlisted', `global` boolean NOT NULL DEFAULT '0' COMMENT '', @@ -1096,7 +1100,8 @@ CREATE TABLE IF NOT EXISTS `post-user` ( `owner-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Link to the contact table with uid=0 of the owner of this item', `author-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Link to the contact table with uid=0 of the author of this item', `causer-id` int unsigned COMMENT 'Link to the contact table with uid=0 of the contact that caused the item creation', - `post-type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Post type (personal note, bookmark, ...)', + `post-type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Post type (personal note, image, article, ...)', + `post-reason` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Reason why the post arrived at the user', `vid` smallint unsigned COMMENT 'Id of the verb table entry that contains the activity verbs', `private` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '0=public, 1=private, 2=unlisted', `global` boolean NOT NULL DEFAULT '0' COMMENT '', @@ -1131,6 +1136,7 @@ CREATE TABLE IF NOT EXISTS `post-user` ( INDEX `uid_contactid` (`uid`,`contact-id`), INDEX `uid_unseen_contactid` (`uid`,`unseen`,`contact-id`), INDEX `uid_unseen` (`uid`,`unseen`), + INDEX `uid_hidden_uri-id` (`uid`,`hidden`,`uri-id`), FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`parent-uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`thr-parent-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, @@ -1483,10 +1489,12 @@ CREATE VIEW `post-user-view` AS SELECT `post-user`.`received` AS `received`, `post-thread-user`.`changed` AS `changed`, `post-user`.`post-type` AS `post-type`, + `post-user`.`post-reason` AS `post-reason`, `post-user`.`private` AS `private`, `post-thread-user`.`pubmail` AS `pubmail`, `post-user`.`visible` AS `visible`, `post-thread-user`.`starred` AS `starred`, + `post-thread-user`.`pinned` AS `pinned`, `post-user`.`unseen` AS `unseen`, `post-user`.`deleted` AS `deleted`, `post-user`.`origin` AS `origin`, @@ -1641,11 +1649,13 @@ CREATE VIEW `post-thread-user-view` AS SELECT `post-thread-user`.`received` AS `received`, `post-thread-user`.`changed` AS `changed`, `post-user`.`post-type` AS `post-type`, + `post-user`.`post-reason` AS `post-reason`, `post-user`.`private` AS `private`, `post-thread-user`.`pubmail` AS `pubmail`, `post-thread-user`.`ignored` AS `ignored`, `post-user`.`visible` AS `visible`, `post-thread-user`.`starred` AS `starred`, + `post-thread-user`.`pinned` AS `pinned`, `post-thread-user`.`unseen` AS `unseen`, `post-user`.`deleted` AS `deleted`, `post-thread-user`.`origin` AS `origin`, @@ -2224,6 +2234,7 @@ CREATE VIEW `tag-search-view` AS SELECT `post-user`.`gravity` AS `gravity`, `post-user`.`received` AS `received`, `post-user`.`network` AS `network`, + `post-user`.`author-id` AS `author-id`, `tag`.`name` AS `name` FROM `post-tag` INNER JOIN `tag` ON `tag`.`id` = `post-tag`.`tid`