Updated database.sql / messages.po
[friendica.git/.git] / database.sql
index 9ec0037..16b5803 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
--- Friendica 2024.03-dev (Yellow Archangel)
--- DB_UPDATE_VERSION 1551
+-- Friendica 2024.06-dev (Yellow Archangel)
+-- DB_UPDATE_VERSION 1557
 -- ------------------------------------------
 
 
@@ -539,6 +539,7 @@ CREATE TABLE IF NOT EXISTS `contact-relation` (
        `relation-score` smallint unsigned COMMENT 'score for interactions of relation-cid on cid',
        `thread-score` smallint unsigned COMMENT 'score for interactions of cid on threads of relation-cid',
        `relation-thread-score` smallint unsigned COMMENT 'score for interactions of relation-cid on threads of cid',
+       `post-score` smallint unsigned COMMENT 'score for the amount of posts from cid that can be seen by relation-cid',
         PRIMARY KEY(`cid`,`relation-cid`),
         INDEX `relation-cid` (`relation-cid`),
        FOREIGN KEY (`cid`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE,
@@ -1283,6 +1284,7 @@ CREATE TABLE IF NOT EXISTS `post-content` (
        `location` varchar(255) NOT NULL DEFAULT '' COMMENT 'text location where this item originated',
        `coord` varchar(255) NOT NULL DEFAULT '' COMMENT 'longitude/latitude pair representing location where this item originated',
        `language` text COMMENT 'Language information about this post',
+       `sensitive` boolean COMMENT 'If true, this post contains sensitive content',
        `app` varchar(255) NOT NULL DEFAULT '' COMMENT 'application which generated this item',
        `rendered-hash` varchar(32) NOT NULL DEFAULT '' COMMENT '',
        `rendered-html` mediumtext COMMENT 'item.body converted to html',
@@ -1350,6 +1352,7 @@ CREATE TABLE IF NOT EXISTS `post-engagement` (
        `searchtext` mediumtext COMMENT 'Simplified text for the full text search',
        `size` int unsigned COMMENT 'Body size',
        `created` datetime COMMENT '',
+       `network` char(4) COMMENT '',
        `restricted` boolean NOT NULL DEFAULT '0' COMMENT 'If true, this post is either unlisted or not from a federated network',
        `comments` mediumint unsigned COMMENT 'Number of comments',
        `activities` mediumint unsigned COMMENT 'Number of activities (like, dislike, ...)',
@@ -2014,7 +2017,8 @@ CREATE VIEW `application-view` AS SELECT
        `application-token`.`follow` AS `follow`,
        `application-token`.`push` AS `push`
        FROM `application-token`
-                       INNER JOIN `application` ON `application-token`.`application-id` = `application`.`id`;
+                       INNER JOIN `application` ON `application-token`.`application-id` = `application`.`id`
+                       INNER JOIN `user` ON `user`.`uid` = `application-token`.`uid` AND `user`.`verified` AND NOT `user`.`blocked` AND NOT `user`.`account_removed` AND NOT `user`.`account_expired`;
 
 --
 -- VIEW circle-member-view
@@ -2121,6 +2125,7 @@ CREATE VIEW `post-searchindex-user-view` AS SELECT
        `post-thread-user`.`commented` AS `commented`,
        `post-thread-user`.`received` AS `received`,
        `post-thread-user`.`created` AS `created`,
+       `post-thread-user`.`network` AS `network`,
        `post-searchindex`.`language` AS `restricted`,
        0 AS `comments`,
        0 AS `activities`
@@ -2194,6 +2199,7 @@ CREATE VIEW `post-user-view` AS SELECT
        `post-content`.`plink` AS `plink`,
        `post-content`.`location` AS `location`,
        `post-content`.`coord` AS `coord`,
+       `post-content`.`sensitive` AS `sensitive`,
        `post-content`.`app` AS `app`,
        `post-content`.`object-type` AS `object-type`,
        `post-content`.`object` AS `object`,
@@ -2378,6 +2384,7 @@ CREATE VIEW `post-thread-user-view` AS SELECT
        `post-content`.`plink` AS `plink`,
        `post-content`.`location` AS `location`,
        `post-content`.`coord` AS `coord`,
+       `post-content`.`sensitive` AS `sensitive`,
        `post-content`.`app` AS `app`,
        `post-content`.`object-type` AS `object-type`,
        `post-content`.`object` AS `object`,
@@ -2548,6 +2555,7 @@ CREATE VIEW `post-view` AS SELECT
        `post-content`.`plink` AS `plink`,
        `post-content`.`location` AS `location`,
        `post-content`.`coord` AS `coord`,
+       `post-content`.`sensitive` AS `sensitive`,
        `post-content`.`app` AS `app`,
        `post-content`.`object-type` AS `object-type`,
        `post-content`.`object` AS `object`,
@@ -2694,6 +2702,7 @@ CREATE VIEW `post-thread-view` AS SELECT
        `post-content`.`plink` AS `plink`,
        `post-content`.`location` AS `location`,
        `post-content`.`coord` AS `coord`,
+       `post-content`.`sensitive` AS `sensitive`,
        `post-content`.`app` AS `app`,
        `post-content`.`object-type` AS `object-type`,
        `post-content`.`object` AS `object`,