X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=database.sql;h=7a18fad5cbb397878765c14520aa5de7228c58b2;hb=0e2f4b682580ecf7d5c55044e484b98ea75f2047;hp=5522b574bbf4cfa833a9e1c5ee74b0202ca1f536;hpb=df547ba73fe6bc719216758981f66e17c5fe7eb9;p=friendica.git diff --git a/database.sql b/database.sql index 5522b574bb..7a18fad5cb 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ --- Friendica 2021.03-rc (Red Hot Poker) --- DB_UPDATE_VERSION 1410 +-- Friendica 2021.06-dev (Siberian Iris) +-- DB_UPDATE_VERSION 1414 -- ------------------------------------------ @@ -197,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 @@ -931,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 '', @@ -1034,6 +1037,13 @@ CREATE TABLE IF NOT EXISTS `post-media` ( `preview-height` smallint unsigned COMMENT 'Height of the preview picture', `preview-width` smallint unsigned COMMENT 'Width of the preview picture', `description` text COMMENT '', + `name` varchar(255) COMMENT 'Name of the media', + `author-url` varbinary(255) COMMENT 'URL of the author of the media', + `author-name` varchar(255) COMMENT 'Name of the author of the media', + `author-image` varbinary(255) COMMENT 'Image of the author of the media', + `publisher-url` varbinary(255) COMMENT 'URL of the publisher of the media', + `publisher-name` varchar(255) COMMENT 'Name of the publisher of the media', + `publisher-image` varbinary(255) COMMENT 'Image of the publisher of the media', PRIMARY KEY(`id`), UNIQUE INDEX `uri-id-url` (`uri-id`,`url`), FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE @@ -1097,7 +1107,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 '', @@ -1485,10 +1496,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`, @@ -1643,11 +1656,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`, @@ -2226,6 +2241,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`