]> git.mxchange.org Git - friendica.git/blobdiff - static/dbstructure.config.php
Calculate the interaction score
[friendica.git] / static / dbstructure.config.php
index dcda833aaf6e12b6813a41860ae75e9ccffe0ac8..7520a11092f8e17c72b60c212497e17d6aa7c206 100644 (file)
@@ -56,7 +56,7 @@ use Friendica\Database\DBA;
 
 // This file is required several times during the test in DbaDefinition which justifies this condition
 if (!defined('DB_UPDATE_VERSION')) {
-       define('DB_UPDATE_VERSION', 1527);
+       define('DB_UPDATE_VERSION', 1530);
 }
 
 return [
@@ -168,6 +168,7 @@ return [
                ],
                "indexes" => [
                        "PRIMARY" => ["uid", "gsid"],
+                       "gsid" => ["gsid"]
                ],
        ],
        "item-uri" => [
@@ -229,8 +230,8 @@ return [
                        "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
                        "unsearchable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact prefers to not be searchable"],
                        "sensitive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact posts sensitive content"],
-                       "baseurl" => ["type" => "varbinary(383)", "default" => "", "comment" => "baseurl of the contact"],
-                       "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
+                       "baseurl" => ["type" => "varbinary(383)", "default" => "", "comment" => "baseurl of the contact from the gserver record, can be missing"],
+                       "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID, can be missing"],
                        "bd" => ["type" => "date", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""],
                        // User depending fields
                        "reason" => ["type" => "text", "comment" => ""],
@@ -570,6 +571,10 @@ return [
                        "last-interaction" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last interaction"],
                        "follow-updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last update of the contact relationship"],
                        "follows" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                       "score" => ["type" => "smallint unsigned", "comment" => "score for interactions of cid on relation-cid"],
+                       "relation-score" => ["type" => "smallint unsigned", "comment" => "score for interactions of relation-cid on cid"],
+                       "thread-score" => ["type" => "smallint unsigned", "comment" => "score for interactions of cid on threads of relation-cid"],
+                       "relation-thread-score" => ["type" => "smallint unsigned", "comment" => "score for interactions of relation-cid on threads of cid"],
                ],
                "indexes" => [
                        "PRIMARY" => ["cid", "relation-cid"],