]> git.mxchange.org Git - friendica.git/blobdiff - doc/database/db_contact.md
Merge pull request #13390 from annando/channel
[friendica.git] / doc / database / db_contact.md
index 8e9e1056518560875fa8b10fa07503441f17f8b5..8221f279e271418fae472c03a76dcdf749d524f8 100644 (file)
@@ -20,19 +20,20 @@ Fields
 | keywords                  | public keywords (interests) of the contact                                                                     | text               | YES  |     | NULL                |                |
 | xmpp                      | XMPP address                                                                                                   | varchar(255)       | NO   |     |                     |                |
 | matrix                    | Matrix address                                                                                                 | varchar(255)       | NO   |     |                     |                |
-| avatar                    |                                                                                                                | varchar(255)       | NO   |     |                     |                |
-| header                    | Header picture                                                                                                 | varchar(255)       | YES  |     | NULL                |                |
-| url                       |                                                                                                                | varchar(255)       | NO   |     |                     |                |
-| nurl                      |                                                                                                                | varchar(255)       | NO   |     |                     |                |
+| avatar                    |                                                                                                                | varbinary(383)     | NO   |     |                     |                |
+| blurhash                  | BlurHash representation of the avatar                                                                          | varbinary(255)     | YES  |     | NULL                |                |
+| header                    | Header picture                                                                                                 | varbinary(383)     | YES  |     | NULL                |                |
+| url                       |                                                                                                                | varbinary(383)     | NO   |     |                     |                |
+| nurl                      |                                                                                                                | varbinary(383)     | NO   |     |                     |                |
 | uri-id                    | Id of the item-uri table entry that contains the contact url                                                   | int unsigned       | YES  |     | NULL                |                |
 | addr                      |                                                                                                                | varchar(255)       | NO   |     |                     |                |
-| alias                     |                                                                                                                | varchar(255)       | NO   |     |                     |                |
+| alias                     |                                                                                                                | varbinary(383)     | NO   |     |                     |                |
 | pubkey                    | RSA public key 4096 bit                                                                                        | text               | YES  |     | NULL                |                |
 | prvkey                    | RSA private key 4096 bit                                                                                       | text               | YES  |     | NULL                |                |
-| batch                     |                                                                                                                | varchar(255)       | NO   |     |                     |                |
-| notify                    |                                                                                                                | varchar(255)       | YES  |     | NULL                |                |
-| poll                      |                                                                                                                | varchar(255)       | YES  |     | NULL                |                |
-| subscribe                 |                                                                                                                | varchar(255)       | YES  |     | NULL                |                |
+| batch                     |                                                                                                                | varbinary(383)     | NO   |     |                     |                |
+| notify                    |                                                                                                                | varbinary(383)     | YES  |     | NULL                |                |
+| poll                      |                                                                                                                | varbinary(383)     | YES  |     | NULL                |                |
+| subscribe                 |                                                                                                                | varbinary(383)     | YES  |     | NULL                |                |
 | last-update               | Date of the last try to update the contact info                                                                | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
 | next-update               | Next connection request                                                                                        | datetime           | YES  |     | NULL                |                |
 | success_update            | Date of the last successful contact update                                                                     | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
@@ -50,8 +51,8 @@ Fields
 | archive                   |                                                                                                                | boolean            | NO   |     | 0                   |                |
 | unsearchable              | Contact prefers to not be searchable                                                                           | boolean            | NO   |     | 0                   |                |
 | sensitive                 | Contact posts sensitive content                                                                                | boolean            | NO   |     | 0                   |                |
-| baseurl                   | baseurl of the contact                                                                                         | varchar(255)       | YES  |     |                     |                |
-| gsid                      | Global Server ID                                                                                               | int unsigned       | YES  |     | NULL                |                |
+| baseurl                   | baseurl of the contact from the gserver record, can be missing                                                 | varbinary(383)     | YES  |     |                     |                |
+| gsid                      | Global Server ID, can be missing                                                                               | int unsigned       | YES  |     | NULL                |                |
 | bd                        |                                                                                                                | date               | NO   |     | 0001-01-01          |                |
 | reason                    |                                                                                                                | text               | YES  |     | NULL                |                |
 | self                      | 1 if the contact is the user him/her self                                                                      | boolean            | NO   |     | 0                   |                |
@@ -59,7 +60,7 @@ Fields
 | rel                       | The kind of the relation between the user and the contact                                                      | tinyint unsigned   | NO   |     | 0                   |                |
 | protocol                  | Protocol of the contact                                                                                        | char(4)            | NO   |     |                     |                |
 | subhub                    |                                                                                                                | boolean            | NO   |     | 0                   |                |
-| hub-verify                |                                                                                                                | varchar(255)       | NO   |     |                     |                |
+| hub-verify                |                                                                                                                | varbinary(383)     | NO   |     |                     |                |
 | rating                    | Automatically detected feed poll frequency                                                                     | tinyint            | NO   |     | 0                   |                |
 | priority                  | Feed poll priority                                                                                             | tinyint unsigned   | NO   |     | 0                   |                |
 | attag                     |                                                                                                                | varchar(255)       | NO   |     |                     |                |
@@ -70,24 +71,24 @@ Fields
 | notify_new_posts          |                                                                                                                | boolean            | NO   |     | 0                   |                |
 | fetch_further_information |                                                                                                                | tinyint unsigned   | NO   |     | 0                   |                |
 | ffi_keyword_denylist      |                                                                                                                | text               | YES  |     | NULL                |                |
-| photo                     | Link to the profile photo of the contact                                                                       | varchar(255)       | YES  |     |                     |                |
-| thumb                     | Link to the profile photo (thumb size)                                                                         | varchar(255)       | YES  |     |                     |                |
-| micro                     | Link to the profile photo (micro size)                                                                         | varchar(255)       | YES  |     |                     |                |
+| photo                     | Link to the profile photo of the contact                                                                       | varbinary(383)     | YES  |     |                     |                |
+| thumb                     | Link to the profile photo (thumb size)                                                                         | varbinary(383)     | YES  |     |                     |                |
+| micro                     | Link to the profile photo (micro size)                                                                         | varbinary(383)     | YES  |     |                     |                |
 | name-date                 |                                                                                                                | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
 | uri-date                  |                                                                                                                | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
 | avatar-date               |                                                                                                                | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
-| request                   |                                                                                                                | varchar(255)       | YES  |     | NULL                |                |
-| confirm                   |                                                                                                                | varchar(255)       | YES  |     | NULL                |                |
-| poco                      |                                                                                                                | varchar(255)       | YES  |     | NULL                |                |
+| request                   |                                                                                                                | varbinary(383)     | YES  |     | NULL                |                |
+| confirm                   |                                                                                                                | varbinary(383)     | YES  |     | NULL                |                |
+| poco                      |                                                                                                                | varbinary(383)     | YES  |     | NULL                |                |
 | writable                  |                                                                                                                | boolean            | NO   |     | 0                   |                |
-| forum                     | contact is a forum. Deprecated, use 'contact-type' = 'community' and 'manually-approve' = false instead        | boolean            | NO   |     | 0                   |                |
+| forum                     | contact is a group. Deprecated, use 'contact-type' = 'community' and 'manually-approve' = false instead        | boolean            | NO   |     | 0                   |                |
 | prv                       | contact is a private group. Deprecated, use 'contact-type' = 'community' and 'manually-approve' = true instead | boolean            | NO   |     | 0                   |                |
 | bdyear                    |                                                                                                                | varchar(4)         | NO   |     |                     |                |
 | site-pubkey               | Deprecated                                                                                                     | text               | YES  |     | NULL                |                |
 | gender                    | Deprecated                                                                                                     | varchar(32)        | NO   |     |                     |                |
 | duplex                    | Deprecated                                                                                                     | boolean            | NO   |     | 0                   |                |
-| issued-id                 | Deprecated                                                                                                     | varchar(255)       | NO   |     |                     |                |
-| dfrn-id                   | Deprecated                                                                                                     | varchar(255)       | NO   |     |                     |                |
+| issued-id                 | Deprecated                                                                                                     | varbinary(383)     | NO   |     |                     |                |
+| dfrn-id                   | Deprecated                                                                                                     | varbinary(383)     | NO   |     |                     |                |
 | aes_allow                 | Deprecated                                                                                                     | boolean            | NO   |     | 0                   |                |
 | ret-aes                   | Deprecated                                                                                                     | boolean            | NO   |     | 0                   |                |
 | usehub                    | Deprecated                                                                                                     | boolean            | NO   |     | 0                   |                |
@@ -121,7 +122,7 @@ Indexes
 | uid_contact-type            | uid, contact-type                    |
 | uid_self_contact-type       | uid, self, contact-type              |
 | self_network_uid            | self, network, uid                   |
-| gsid                        | gsid                                 |
+| gsid_uid_failed             | gsid, uid, failed                    |
 | uri-id                      | uri-id                               |
 
 Foreign Keys