Merge branch 'develop' of https://github.com/friendica/friendica into develop
[friendica.git/.git] / doc / database / db_apcontact.md
1 Table apcontact
2 ===========
3
4 ActivityPub compatible contacts - used in the ActivityPub implementation
5
6 Fields
7 ------
8
9 | Field            | Description                                                         | Type           | Null | Key | Default             | Extra |
10 | ---------------- | ------------------------------------------------------------------- | -------------- | ---- | --- | ------------------- | ----- |
11 | url              | URL of the contact                                                  | varbinary(383) | NO   | PRI | NULL                |       |
12 | uri-id           | Id of the item-uri table entry that contains the apcontact url      | int unsigned   | YES  |     | NULL                |       |
13 | uuid             |                                                                     | varbinary(255) | YES  |     | NULL                |       |
14 | type             |                                                                     | varchar(20)    | NO   |     | NULL                |       |
15 | following        |                                                                     | varbinary(383) | YES  |     | NULL                |       |
16 | followers        |                                                                     | varbinary(383) | YES  |     | NULL                |       |
17 | inbox            |                                                                     | varbinary(383) | NO   |     | NULL                |       |
18 | outbox           |                                                                     | varbinary(383) | YES  |     | NULL                |       |
19 | sharedinbox      |                                                                     | varbinary(383) | YES  |     | NULL                |       |
20 | featured         | Address for the collection of featured posts                        | varbinary(383) | YES  |     | NULL                |       |
21 | featured-tags    | Address for the collection of featured tags                         | varbinary(383) | YES  |     | NULL                |       |
22 | manually-approve |                                                                     | boolean        | YES  |     | NULL                |       |
23 | discoverable     | Mastodon extension: true if profile is published in their directory | boolean        | YES  |     | NULL                |       |
24 | suspended        | Mastodon extension: true if profile is suspended                    | boolean        | YES  |     | NULL                |       |
25 | nick             |                                                                     | varchar(255)   | NO   |     |                     |       |
26 | name             |                                                                     | varchar(255)   | YES  |     | NULL                |       |
27 | about            |                                                                     | text           | YES  |     | NULL                |       |
28 | xmpp             | XMPP address                                                        | varchar(255)   | YES  |     | NULL                |       |
29 | matrix           | Matrix address                                                      | varchar(255)   | YES  |     | NULL                |       |
30 | photo            |                                                                     | varbinary(383) | YES  |     | NULL                |       |
31 | header           | Header picture                                                      | varbinary(383) | YES  |     | NULL                |       |
32 | addr             |                                                                     | varchar(255)   | YES  |     | NULL                |       |
33 | alias            |                                                                     | varbinary(383) | YES  |     | NULL                |       |
34 | pubkey           |                                                                     | text           | YES  |     | NULL                |       |
35 | subscribe        |                                                                     | varbinary(383) | YES  |     | NULL                |       |
36 | baseurl          | baseurl of the ap contact                                           | varbinary(383) | YES  |     | NULL                |       |
37 | gsid             | Global Server ID                                                    | int unsigned   | YES  |     | NULL                |       |
38 | generator        | Name of the contact's system                                        | varchar(255)   | YES  |     | NULL                |       |
39 | following_count  | Number of following contacts                                        | int unsigned   | YES  |     | 0                   |       |
40 | followers_count  | Number of followers                                                 | int unsigned   | YES  |     | 0                   |       |
41 | statuses_count   | Number of posts                                                     | int unsigned   | YES  |     | 0                   |       |
42 | updated          |                                                                     | datetime       | NO   |     | 0001-01-01 00:00:00 |       |
43
44 Indexes
45 ------------
46
47 | Name        | Fields           |
48 | ----------- | ---------------- |
49 | PRIMARY     | url              |
50 | addr        | addr(32)         |
51 | alias       | alias(190)       |
52 | followers   | followers(190)   |
53 | baseurl     | baseurl(190)     |
54 | sharedinbox | sharedinbox(190) |
55 | gsid        | gsid             |
56 | uri-id      | UNIQUE, uri-id   |
57
58 Foreign Keys
59 ------------
60
61 | Field | Target Table | Target Field |
62 |-------|--------------|--------------|
63 | uri-id | [item-uri](help/database/db_item-uri) | id |
64 | gsid | [gserver](help/database/db_gserver) | id |
65
66 Return to [database documentation](help/database)