]> git.mxchange.org Git - friendica.git/blobdiff - database.sql
Merge pull request #11588 from annando/mergecontact
[friendica.git] / database.sql
index b9e9d284f2ed4669c3104cb894cc29b49592e8ad..f8d5432658564638a521d2b2201dab2ea3a36ddd 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
 -- Friendica 2022.05-rc (Siberian Iris)
--- DB_UPDATE_VERSION 1463
+-- DB_UPDATE_VERSION 1465
 -- ------------------------------------------
 
 
@@ -1816,6 +1816,8 @@ CREATE VIEW `post-user-view` AS SELECT
        `post-question`.`multiple` AS `question-multiple`,
        `post-question`.`voters` AS `question-voters`,
        `post-question`.`end-time` AS `question-end-time`,
+       EXISTS(SELECT `uri-id` FROM `post-category` WHERE `post-category`.`uri-id` = `post-user`.`uri-id` AND `post-category`.`uid` = `post-user`.`uid`) AS `has-categories`,
+       EXISTS(SELECT `id` FROM `post-media` WHERE `post-media`.`uri-id` = `post-user`.`uri-id`) AS `has-media`,
        `diaspora-interaction`.`interaction` AS `signed_text`,
        `parent-item-uri`.`guid` AS `parent-guid`,
        `parent-post`.`network` AS `parent-network`,
@@ -1985,6 +1987,8 @@ CREATE VIEW `post-thread-user-view` AS SELECT
        `post-question`.`multiple` AS `question-multiple`,
        `post-question`.`voters` AS `question-voters`,
        `post-question`.`end-time` AS `question-end-time`,
+       EXISTS(SELECT `uri-id` FROM `post-category` WHERE `post-category`.`uri-id` = `post-thread-user`.`uri-id` AND `post-category`.`uid` = `post-thread-user`.`uid`) AS `has-categories`,
+       EXISTS(SELECT `id` FROM `post-media` WHERE `post-media`.`uri-id` = `post-thread-user`.`uri-id`) AS `has-media`,
        `diaspora-interaction`.`interaction` AS `signed_text`,
        `parent-item-uri`.`guid` AS `parent-guid`,
        `parent-post`.`network` AS `parent-network`,
@@ -2120,6 +2124,8 @@ CREATE VIEW `post-view` AS SELECT
        `post-question`.`multiple` AS `question-multiple`,
        `post-question`.`voters` AS `question-voters`,
        `post-question`.`end-time` AS `question-end-time`,
+       0 AS `has-categories`,
+       EXISTS(SELECT `id` FROM `post-media` WHERE `post-media`.`uri-id` = `post`.`uri-id`) AS `has-media`,
        `diaspora-interaction`.`interaction` AS `signed_text`,
        `parent-item-uri`.`guid` AS `parent-guid`,
        `parent-post`.`network` AS `parent-network`,
@@ -2251,6 +2257,8 @@ CREATE VIEW `post-thread-view` AS SELECT
        `post-question`.`multiple` AS `question-multiple`,
        `post-question`.`voters` AS `question-voters`,
        `post-question`.`end-time` AS `question-end-time`,
+       0 AS `has-categories`,
+       EXISTS(SELECT `id` FROM `post-media` WHERE `post-media`.`uri-id` = `post-thread`.`uri-id`) AS `has-media`,
        `diaspora-interaction`.`interaction` AS `signed_text`,
        `parent-item-uri`.`guid` AS `parent-guid`,
        `parent-post`.`network` AS `parent-network`,
@@ -2301,6 +2309,9 @@ CREATE VIEW `collection-view` AS SELECT
        `post`.`received` AS `received`,
        `post`.`created` AS `created`,
        `post-thread`.`commented` AS `commented`,
+       `post`.`private` AS `private`,
+       `post`.`visible` AS `visible`,
+       `post`.`deleted` AS `deleted`,
        `post`.`thr-parent-id` AS `thr-parent-id`,
        `post`.`author-id` AS `author-id`,
        `post`.`gravity` AS `gravity`