]> git.mxchange.org Git - friendica.git/blobdiff - static/dbstructure.config.php
Add parameter for "toArray()" method
[friendica.git] / static / dbstructure.config.php
index 486f1f0e9ac4d6244612e02e0158845e6f9ba698..87cfdd11c6330d5a222ba0dce9790b9afad9952e 100755 (executable)
@@ -34,7 +34,7 @@
 use Friendica\Database\DBA;
 
 if (!defined('DB_UPDATE_VERSION')) {
-       define('DB_UPDATE_VERSION', 1324);
+       define('DB_UPDATE_VERSION', 1332);
 }
 
 return [
@@ -102,6 +102,9 @@ return [
                        "pubkey" => ["type" => "text", "comment" => ""],
                        "baseurl" => ["type" => "varchar(255)", "comment" => "baseurl of the ap contact"],
                        "generator" => ["type" => "varchar(255)", "comment" => "Name of the contact's system"],
+                       "following_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of following contacts"],
+                       "followers_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of followers"],
+                       "statuses_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts"],
                        "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
                ],
                "indexes" => [
@@ -123,10 +126,10 @@ return [
                        "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"],
                        "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
                        "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
-                       "allow_cid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Access Control - list of allowed contact.id '<19><78>"],
-                       "allow_gid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Access Control - list of allowed groups"],
-                       "deny_cid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Access Control - list of denied contact.id"],
-                       "deny_gid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Access Control - list of denied groups"],
+                       "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>"],
+                       "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
+                       "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
+                       "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
                        "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
                        "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
                ],
@@ -274,7 +277,7 @@ return [
                        "reason" => ["type" => "text", "comment" => ""],
                        "closeness" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "99", "comment" => ""],
                        "info" => ["type" => "mediumtext", "comment" => ""],
-                       "profile-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+                       "profile-id" => ["type" => "int unsigned", "comment" => "Deprecated"],
                        "bdyear" => ["type" => "varchar(4)", "not null" => "1", "default" => "", "comment" => ""],
                        "bd" => ["type" => "date", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""],
                        "notify_new_posts" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
@@ -360,10 +363,10 @@ return [
                        "nofinish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if event does have no end this is 1"],
                        "adjust" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "adjust to timezone of the recipient (0 or 1)"],
                        "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "0 or 1"],
-                       "allow_cid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
-                       "allow_gid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Access Control - list of allowed groups"],
-                       "deny_cid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Access Control - list of denied contact.id"],
-                       "deny_gid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Access Control - list of denied groups"],
+                       "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
+                       "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
+                       "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
+                       "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
                ],
                "indexes" => [
                        "PRIMARY" => ["id"],
@@ -523,6 +526,7 @@ return [
                        "info" => ["type" => "text", "comment" => ""],
                        "register_policy" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
                        "registered-users" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Number of registered users"],
+                       "directory-type" => ["type" => "tinyint", "default" => "0", "comment" => "Type of directory service (Poco, Mastodon)"],
                        "poco" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
                        "noscrape" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
                        "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
@@ -647,10 +651,10 @@ return [
                        // Could possibly be replaced by the "attach" table?
                        "attach" => ["type" => "mediumtext", "comment" => "JSON structure representing attachments to this item"],
                        // Deprecated fields. Will be removed in upcoming versions
-                       "allow_cid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Deprecated"],
-                       "allow_gid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Deprecated"],
-                       "deny_cid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Deprecated"],
-                       "deny_gid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Deprecated"],
+                       "allow_cid" => ["type" => "mediumtext", "comment" => "Deprecated"],
+                       "allow_gid" => ["type" => "mediumtext", "comment" => "Deprecated"],
+                       "deny_cid" => ["type" => "mediumtext", "comment" => "Deprecated"],
+                       "deny_gid" => ["type" => "mediumtext", "comment" => "Deprecated"],
                        "postopts" => ["type" => "text", "comment" => "Deprecated"],
                        "inform" => ["type" => "mediumtext", "comment" => "Deprecated"],
                        "type" => ["type" => "varchar(20)", "comment" => "Deprecated"],
@@ -702,6 +706,7 @@ return [
                        "resource-id" => ["resource-id"],
                        "deleted_changed" => ["deleted", "changed"],
                        "uid_wall_changed" => ["uid", "wall", "changed"],
+                       "mention_uid_id" => ["mention", "uid", "id"],
                        "uid_eventid" => ["uid", "event-id"],
                        "icid" => ["icid"],
                        "iaid" => ["iaid"],
@@ -868,7 +873,6 @@ return [
                "comment" => "notifications",
                "fields" => [
                        "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
-                       "hash" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => ""],
                        "type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
                        "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
                        "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
@@ -887,7 +891,6 @@ return [
                ],
                "indexes" => [
                        "PRIMARY" => ["id"],
-                       "hash_uid" => ["hash", "uid"],
                        "seen_uid_date" => ["seen", "uid", "date"],
                        "uid_date" => ["uid", "date"],
                        "uid_type_link" => ["uid", "type", "link(190)"],
@@ -982,10 +985,10 @@ return [
                "fields" => [
                        "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
                        "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner id of this permission set"],
-                       "allow_cid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
-                       "allow_gid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Access Control - list of allowed groups"],
-                       "deny_cid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Access Control - list of denied contact.id"],
-                       "deny_gid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Access Control - list of denied groups"],
+                       "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
+                       "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
+                       "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
+                       "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
                ],
                "indexes" => [
                        "PRIMARY" => ["id"],
@@ -1013,10 +1016,10 @@ return [
                        "data" => ["type" => "mediumblob", "not null" => "1", "comment" => ""],
                        "scale" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
                        "profile" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
-                       "allow_cid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
-                       "allow_gid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Access Control - list of allowed groups"],
-                       "deny_cid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Access Control - list of denied contact.id"],
-                       "deny_gid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "Access Control - list of denied groups"],
+                       "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
+                       "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
+                       "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
+                       "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
                        "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"],
                        "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"],
                        "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
@@ -1081,8 +1084,8 @@ return [
                "fields" => [
                        "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
                        "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
-                       "profile-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name of the profile"],
-                       "is-default" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Mark this profile as default profile"],
+                       "profile-name" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+                       "is-default" => ["type" => "boolean", "comment" => "Deprecated"],
                        "hide-friends" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide friend list from viewers of this profile"],
                        "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
                        "pdesc" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Title or description"],
@@ -1092,29 +1095,29 @@ return [
                        "region" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
                        "postal-code" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
                        "country-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
-                       "hometown" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
-                       "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
-                       "marital" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
-                       "with" => ["type" => "text", "comment" => ""],
-                       "howlong" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
-                       "sexual" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
-                       "politic" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
-                       "religion" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                       "hometown" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+                       "gender" => ["type" => "varchar(32)", "comment" => "Deprecated"],
+                       "marital" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+                       "with" => ["type" => "text", "comment" => "Deprecated"],
+                       "howlong" => ["type" => "datetime", "comment" => "Deprecated"],
+                       "sexual" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+                       "politic" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+                       "religion" => ["type" => "varchar(255)", "comment" => "Deprecated"],
                        "pub_keywords" => ["type" => "text", "comment" => ""],
                        "prv_keywords" => ["type" => "text", "comment" => ""],
-                       "likes" => ["type" => "text", "comment" => ""],
-                       "dislikes" => ["type" => "text", "comment" => ""],
-                       "about" => ["type" => "text", "comment" => ""],
-                       "summary" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
-                       "music" => ["type" => "text", "comment" => ""],
-                       "book" => ["type" => "text", "comment" => ""],
-                       "tv" => ["type" => "text", "comment" => ""],
-                       "film" => ["type" => "text", "comment" => ""],
-                       "interest" => ["type" => "text", "comment" => ""],
-                       "romance" => ["type" => "text", "comment" => ""],
-                       "work" => ["type" => "text", "comment" => ""],
-                       "education" => ["type" => "text", "comment" => ""],
-                       "contact" => ["type" => "text", "comment" => ""],
+                       "likes" => ["type" => "text", "comment" => "Deprecated"],
+                       "dislikes" => ["type" => "text", "comment" => "Deprecated"],
+                       "about" => ["type" => "text", "comment" => "Deprecated"],
+                       "summary" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+                       "music" => ["type" => "text", "comment" => "Deprecated"],
+                       "book" => ["type" => "text", "comment" => "Deprecated"],
+                       "tv" => ["type" => "text", "comment" => "Deprecated"],
+                       "film" => ["type" => "text", "comment" => "Deprecated"],
+                       "interest" => ["type" => "text", "comment" => "Deprecated"],
+                       "romance" => ["type" => "text", "comment" => "Deprecated"],
+                       "work" => ["type" => "text", "comment" => "Deprecated"],
+                       "education" => ["type" => "text", "comment" => "Deprecated"],
+                       "contact" => ["type" => "text", "comment" => "Deprecated"],
                        "homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
                        "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
                        "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
@@ -1142,6 +1145,25 @@ return [
                        "PRIMARY" => ["id"],
                ]
        ],
+       "profile_field" => [
+               "comment" => "Custom profile fields",
+               "fields" => [
+                       "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+                       "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner user id"],
+                       "order" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "1", "comment" => "Field ordering per user"],
+                       "psid" => ["type" => "int unsigned", "relation" => ["permissionset" => "id"], "comment" => "ID of the permission set of this profile field - 0 = public"],
+                       "label" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Label of the field"],
+                       "value" => ["type" => "text", "comment" => "Value of the field"],
+                       "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
+                       "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
+               ],
+               "indexes" => [
+                       "PRIMARY" => ["id"],
+                       "uid" => ["uid"],
+                       "order" => ["order"],
+                       "psid" => ["psid"],
+               ]
+       ],
        "push_subscriber" => [
                "comment" => "Used for OStatus: Contains feed subscribers",
                "fields" => [
@@ -1343,10 +1365,10 @@ return [
                        "account_expires_on" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp when account expires and will be deleted"],
                        "expire_notification_sent" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last warning of account expiration"],
                        "def_gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
-                       "allow_cid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "default permission for this user"],
-                       "allow_gid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "default permission for this user"],
-                       "deny_cid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "default permission for this user"],
-                       "deny_gid" => ["type" => "mediumtext", "not null" => "1", "default" => "", "comment" => "default permission for this user"],
+                       "allow_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
+                       "allow_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
+                       "deny_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
+                       "deny_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
                        "openidserver" => ["type" => "text", "comment" => ""],
                ],
                "indexes" => [
@@ -1384,10 +1406,14 @@ return [
                        "iid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["item" => "id"], "comment" => "Item id"],
                        "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["user" => "uid"], "comment" => "User id"],
                        "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide an item from the user"],
-                       "ignored" => ["type" => "boolean", "comment" => "Ignore this thread if set"]
+                       "ignored" => ["type" => "boolean", "comment" => "Ignore this thread if set"],
+                       "pinned" => ["type" => "boolean", "comment" => "The item is pinned on the profile page"],
+                       "notification-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
                ],
                "indexes" => [
-                       "PRIMARY" => ["uid", "iid"]
+                       "PRIMARY" => ["uid", "iid"],
+                       "uid_pinned" => ["uid", "pinned"],
+                       "iid_uid" => ["iid", "uid"]
                ]
        ],
        "worker-ipc" => [