]> git.mxchange.org Git - friendica.git/blobdiff - config/dbstructure.json
Merge pull request #5971 from MrPetovan/bug/5970-use-temppath-passwordexposed
[friendica.git] / config / dbstructure.json
index fa7513332718c20012fd3c1b7af8e02ff1498804..da1da7a66b1a295242db1cf7aaa4ff2af39765c2 100644 (file)
                        "name": ["UNIQUE", "name"]
                }
        },
+       "apcontact": {
+               "comment": "ActivityPub compatible contacts - used in the ActivityPub implementation",
+               "fields": {
+                       "url": {"type": "varbinary(255)", "not null": "1", "primary": "1", "comment": "URL of the contact"},
+                       "uuid": {"type": "varchar(255)", "comment": ""},
+                       "type": {"type": "varchar(20)", "not null": "1", "comment": ""},
+                       "following": {"type": "varchar(255)", "comment": ""},
+                       "followers": {"type": "varchar(255)", "comment": ""},
+                       "inbox": {"type": "varchar(255)", "not null": "1", "comment": ""},
+                       "outbox": {"type": "varchar(255)", "comment": ""},
+                       "sharedinbox": {"type": "varchar(255)", "comment": ""},
+                       "nick": {"type": "varchar(255)", "not null": "1", "default": "", "comment": ""},
+                       "name": {"type": "varchar(255)", "comment": ""},
+                       "about": {"type": "text", "comment": ""},
+                       "photo": {"type": "varchar(255)", "comment": ""},
+                       "addr": {"type": "varchar(255)", "comment": ""},
+                       "alias": {"type": "varchar(255)", "comment": ""},
+                       "pubkey": {"type": "text", "comment": ""},
+                       "baseurl": {"type": "varchar(255)", "comment": "baseurl of the ap contact"},
+                       "updated": {"type": "datetime", "not null": "1", "default": "0001-01-01 00:00:00", "comment": ""}
+
+               },
+               "indexes": {
+                       "PRIMARY": ["url"],
+                       "addr": ["addr(32)"],
+                       "url": ["followers(190)"]
+               }
+       },
        "attach": {
                "comment": "file attachments",
                "fields": {
                        "hidden": {"type": "boolean", "not null": "1", "default": "0", "comment": ""},
                        "archive": {"type": "boolean", "not null": "1", "default": "0", "comment": ""},
                        "pending": {"type": "boolean", "not null": "1", "default": "1", "comment": ""},
+                       "deleted": {"type": "boolean", "not null": "1", "default": "0", "comment": "Contact has been deleted"},
                        "rating": {"type": "tinyint", "not null": "1", "default": "0", "comment": ""},
                        "reason": {"type": "text", "comment": ""},
                        "closeness": {"type": "tinyint unsigned", "not null": "1", "default": "99", "comment": ""},
        "conversation": {
                "comment": "Raw data and structure information for messages",
                "fields": {
-                       "item-uri": {"type": "varbinary(255)", "not null": "1", "primary": "1", "comment": "URI of the item"},
+                       "item-uri": {"type": "varbinary(255)", "not null": "1", "primary": "1", "comment": "Original URI of the item - unrelated to the table with the same name"},
                        "reply-to-uri": {"type": "varbinary(255)", "not null": "1", "default": "", "comment": "URI to which this item is a reply"},
                        "conversation-uri": {"type": "varbinary(255)", "not null": "1", "default": "", "comment": "GNU Social conversation URI"},
                        "conversation-href": {"type": "varbinary(255)", "not null": "1", "default": "", "comment": "GNU Social conversation link"},
-                       "protocol": {"type": "tinyint unsigned", "not null": "1", "default": "0", "comment": "The protocol of the item"},
+                       "protocol": {"type": "tinyint unsigned", "not null": "1", "default": "255", "comment": "The protocol of the item"},
                        "source": {"type": "mediumtext", "comment": "Original source"},
                        "received": {"type": "datetime", "not null": "1", "default": "0001-01-01 00:00:00", "comment": "Receiving date"}
                },
                        "received": ["received"]
                }
        },
+       "diaspora-interaction": {
+               "comment": "Signed Diaspora Interaction",
+               "fields": {
+                       "uri-id": {"type": "int unsigned", "not null": "1", "primary": "1", "relation": {"item-uri": "id"}, "comment": "Id of the item-uri table entry that contains the item uri"},
+                       "interaction": {"type": "mediumtext", "comment": "The Diaspora interaction"}
+               },
+               "indexes": {
+                       "PRIMARY": ["uri-id"]
+               }
+       },
        "event": {
                "comment": "Events",
                "fields": {
                        "id": {"type": "int unsigned", "not null": "1", "extra": "auto_increment", "primary": "1", "relation": {"thread": "iid"}},
                        "guid": {"type": "varchar(255)", "not null": "1", "default": "", "comment": "A unique identifier for this item"},
                        "uri": {"type": "varchar(255)", "not null": "1", "default": "", "comment": ""},
+                       "uri-id": {"type": "int unsigned", "relation": {"item-uri": "id"}, "comment": "Id of the item-uri table entry that contains the item uri"},
                        "uri-hash": {"type": "varchar(80)", "not null": "1", "default": "", "comment": "RIPEMD-128 hash from uri"},
                        "parent": {"type": "int unsigned", "not null": "1", "default": "0", "relation": {"item": "id"}, "comment": "item.id of the parent to this item if it is a reply of some form; otherwise this must be set to the id of this item"},
                        "parent-uri": {"type": "varchar(255)", "not null": "1", "default": "", "comment": "uri of the parent to this item"},
+                       "parent-uri-id": {"type": "int unsigned", "relation": {"item-uri": "id"}, "comment": "Id of the item-uri table that contains the parent uri"},
                        "thr-parent": {"type": "varchar(255)", "not null": "1", "default": "", "comment": "If the parent of this item is not the top-level item in the conversation, the uri of the immediate parent; otherwise set to parent-uri"},
+                       "thr-parent-id": {"type": "int unsigned", "relation": {"item-uri": "id"}, "comment": "Id of the item-uri table that contains the thread parent uri"},
                        "created": {"type": "datetime", "not null": "1", "default": "0001-01-01 00:00:00", "comment": "Creation timestamp."},
                        "edited": {"type": "datetime", "not null": "1", "default": "0001-01-01 00:00:00", "comment": "Date of last edit (default is created)"},
                        "commented": {"type": "datetime", "not null": "1", "default": "0001-01-01 00:00:00", "comment": "Date of last comment/reply to this item"},
                "fields": {
                        "id": {"type": "int unsigned", "not null": "1", "extra": "auto_increment", "primary": "1", "relation": {"thread": "iid"}},
                        "uri": {"type": "varchar(255)", "comment": ""},
+                       "uri-id": {"type": "int unsigned", "relation": {"item-uri": "id"}, "comment": "Id of the item-uri table entry that contains the item uri"},
                        "uri-hash": {"type": "varchar(80)", "not null": "1", "default": "", "comment": "RIPEMD-128 hash from uri"},
                        "activity": {"type": "smallint unsigned", "not null": "1", "default": "0", "comment": ""}
                },
                "indexes": {
                        "PRIMARY": ["id"],
                        "uri-hash": ["UNIQUE", "uri-hash"],
-                       "uri": ["uri(191)"]
+                       "uri": ["uri(191)"],
+                       "uri-id": ["uri-id"]
                }
        },
        "item-content": {
                "fields": {
                        "id": {"type": "int unsigned", "not null": "1", "extra": "auto_increment", "primary": "1", "relation": {"thread": "iid"}},
                        "uri": {"type": "varchar(255)", "comment": ""},
+                       "uri-id": {"type": "int unsigned", "relation": {"item-uri": "id"}, "comment": "Id of the item-uri table entry that contains the item uri"},
                        "uri-plink-hash": {"type": "varchar(80)", "not null": "1", "default": "", "comment": "RIPEMD-128 hash from uri"},
                        "title": {"type": "varchar(255)", "not null": "1", "default": "", "comment": "item title"},
                        "content-warning": {"type": "varchar(255)", "not null": "1", "default": "", "comment": ""},
                "indexes": {
                        "PRIMARY": ["id"],
                        "uri-plink-hash": ["UNIQUE", "uri-plink-hash"],
-                       "uri": ["uri(191)"]
+                       "uri": ["uri(191)"],
+                       "uri-id": ["uri-id"]
                }
        },
        "item-delivery-data": {
                        "PRIMARY": ["iid"]
                }
        },
+       "item-uri": {
+               "comment": "URI and GUID for items",
+               "fields": {
+                       "id": {"type": "int unsigned", "not null": "1", "extra": "auto_increment", "primary": "1"},
+                       "uri": {"type": "varbinary(255)", "not null": "1", "comment": "URI of an item"},
+                       "guid": {"type": "varbinary(255)", "comment": "A unique identifier for an item"}
+               },
+               "indexes": {
+                       "PRIMARY": ["id"],
+                       "uri": ["UNIQUE", "uri"],
+                       "guid": ["guid"]
+               }
+       },
        "locks": {
                "comment": "",
                "fields": {
                        "username": ["username(32)"]
                }
        },
+       "user-contact": {
+               "comment": "User specific public contact data",
+               "fields": {
+                       "cid": {"type": "int unsigned", "not null": "1", "default": "0", "primary": "1", "relation": {"contact": "id"}, "comment": "Contact id of the linked public contact"},
+                       "uid": {"type": "mediumint unsigned", "not null": "1", "default": "0", "primary": "1", "relation": {"user": "uid"}, "comment": "User id"},
+                       "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"}
+               },
+               "indexes": {
+                       "PRIMARY": ["uid", "cid"]
+               }
+       },
        "user-item": {
                "comment": "User specific item data",
                "fields": {
                        "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"}
+                       "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"}
                },
                "indexes": {
                        "PRIMARY": ["uid", "iid"]
                        "created": {"type": "datetime", "not null": "1", "default": "0001-01-01 00:00:00", "comment": "Creation date"},
                        "pid": {"type": "int unsigned", "not null": "1", "default": "0", "comment": "Process id of the worker"},
                        "executed": {"type": "datetime", "not null": "1", "default": "0001-01-01 00:00:00", "comment": "Execution date"},
+                       "next_try": {"type": "datetime", "not null": "1", "default": "0001-01-01 00:00:00", "comment": "Next retrial date"},
+                       "retrial": {"type": "tinyint", "not null": "1", "default": "0", "comment": "Retrial counter"},
                        "done": {"type": "boolean", "not null": "1", "default": "0", "comment": "Marked 1 when the task was done - will be deleted later"}
                },
                "indexes": {
                        "PRIMARY": ["id"],
                        "pid": ["pid"],
                        "parameter": ["parameter(64)"],
-                       "priority_created": ["priority", "created"],
-                       "done_executed": ["done", "executed"]
+                       "priority_created_next_try": ["priority", "created", "next_try"],
+                       "done_executed_next_try": ["done", "executed", "next_try"]
                }
        }
-}
\ No newline at end of file
+}