]> git.mxchange.org Git - friendica.git/blobdiff - static/dbstructure.config.php
Insert a `user-contact` for every contact
[friendica.git] / static / dbstructure.config.php
index f820401a192939350fd3144f34e5567be0f48ff0..fd6c4c798fdc5b60b2bcceda12326bfe31ac8bd6 100644 (file)
@@ -55,7 +55,7 @@
 use Friendica\Database\DBA;
 
 if (!defined('DB_UPDATE_VERSION')) {
-       define('DB_UPDATE_VERSION', 1433);
+       define('DB_UPDATE_VERSION', 1435);
 }
 
 return [
@@ -1492,6 +1492,29 @@ return [
                        "PRIMARY" => ["id"]
                ]
        ],
+       "subscription" => [
+               "comment" => "Push Subscription for the API",
+               "fields" => [
+                       "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented image data id"],
+                       "application-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["application" => "id"], "comment" => ""],
+                       "uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "Owner User id"],
+                       "endpoint" => ["type" => "varchar(511)", "comment" => "Endpoint URL"],
+                       "pubkey" => ["type" => "varchar(127)", "comment" => "User agent public key"],
+                       "secret" => ["type" => "varchar(32)", "comment" => "Auth secret"],
+                       "follow" => ["type" => "boolean", "comment" => ""],
+                       "favourite" => ["type" => "boolean", "comment" => ""],
+                       "reblog" => ["type" => "boolean", "comment" => ""],
+                       "mention" => ["type" => "boolean", "comment" => ""],
+                       "poll" => ["type" => "boolean", "comment" => ""],
+                       "follow_request" => ["type" => "boolean", "comment" => ""],
+                       "status" => ["type" => "boolean", "comment" => ""],
+               ],
+               "indexes" => [
+                       "PRIMARY" => ["id"],
+                       "application-id_uid" => ["UNIQUE", "application-id", "uid"],
+                       "uid_application-id" => ["uid", "application-id"],
+               ]
+       ],
        "userd" => [
                "comment" => "Deleted usernames",
                "fields" => [
@@ -1508,6 +1531,7 @@ return [
                "fields" => [
                        "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["contact" => "id"], "comment" => "Contact id of the linked public contact"],
                        "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "foreign" => ["user" => "uid"], "comment" => "User id"],
+                       "uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the contact url"],
                        "blocked" => ["type" => "boolean", "comment" => "Contact is completely blocked for this user"],
                        "ignored" => ["type" => "boolean", "comment" => "Posts from this contact are ignored"],
                        "collapsed" => ["type" => "boolean", "comment" => "Posts from this contact are collapsed"]
@@ -1515,6 +1539,7 @@ return [
                "indexes" => [
                        "PRIMARY" => ["uid", "cid"],
                        "cid" => ["cid"],
+                       "uri-id_uid" => ["UNIQUE", "uri-id", "uid"],
                ]
        ],
        "worker-ipc" => [