]> git.mxchange.org Git - friendica.git/blob - doc/database/db_post-thread-user.md
Merge pull request #10362 from tobiasd/2021.06-CHANGELOG
[friendica.git] / doc / database / db_post-thread-user.md
1 Table post-thread-user
2 ===========
3
4 Thread related data per user
5
6 Fields
7 ------
8
9 | Field        | Description                                                                                             | Type               | Null | Key | Default             | Extra |
10 | ------------ | ------------------------------------------------------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | ----- |
11 | uri-id       | Id of the item-uri table entry that contains the item uri                                               | int unsigned       | NO   | PRI | NULL                |       |
12 | owner-id     | Item owner                                                                                              | int unsigned       | NO   |     | 0                   |       |
13 | author-id    | Item author                                                                                             | int unsigned       | NO   |     | 0                   |       |
14 | causer-id    | Link to the contact table with uid=0 of the contact that caused the item creation                       | int unsigned       | YES  |     | NULL                |       |
15 | network      |                                                                                                         | char(4)            | NO   |     |                     |       |
16 | created      |                                                                                                         | datetime           | NO   |     | 0001-01-01 00:00:00 |       |
17 | received     |                                                                                                         | datetime           | NO   |     | 0001-01-01 00:00:00 |       |
18 | changed      | Date that something in the conversation changed, indicating clients should fetch the conversation again | datetime           | NO   |     | 0001-01-01 00:00:00 |       |
19 | commented    |                                                                                                         | datetime           | NO   |     | 0001-01-01 00:00:00 |       |
20 | uid          | Owner id which owns this copy of the item                                                               | mediumint unsigned | NO   | PRI | 0                   |       |
21 | pinned       | The thread is pinned on the profile page                                                                | boolean            | NO   |     | 0                   |       |
22 | starred      |                                                                                                         | boolean            | NO   |     | 0                   |       |
23 | ignored      | Ignore updates for this thread                                                                          | boolean            | NO   |     | 0                   |       |
24 | wall         | This item was posted to the wall of uid                                                                 | boolean            | NO   |     | 0                   |       |
25 | mention      |                                                                                                         | boolean            | NO   |     | 0                   |       |
26 | pubmail      |                                                                                                         | boolean            | NO   |     | 0                   |       |
27 | forum_mode   |                                                                                                         | tinyint unsigned   | NO   |     | 0                   |       |
28 | contact-id   | contact.id                                                                                              | int unsigned       | NO   |     | 0                   |       |
29 | unseen       | post has not been seen                                                                                  | boolean            | NO   |     | 1                   |       |
30 | hidden       | Marker to hide the post from the user                                                                   | boolean            | NO   |     | 0                   |       |
31 | origin       | item originated at this site                                                                            | boolean            | NO   |     | 0                   |       |
32 | psid         | ID of the permission set of this post                                                                   | int unsigned       | YES  |     | NULL                |       |
33 | post-user-id | Id of the post-user table                                                                               | int unsigned       | YES  |     | NULL                |       |
34
35 Indexes
36 ------------
37
38 | Name          | Fields         |
39 | ------------- | -------------- |
40 | PRIMARY       | uid, uri-id    |
41 | uri-id        | uri-id         |
42 | owner-id      | owner-id       |
43 | author-id     | author-id      |
44 | causer-id     | causer-id      |
45 | uid           | uid            |
46 | contact-id    | contact-id     |
47 | psid          | psid           |
48 | post-user-id  | post-user-id   |
49 | commented     | commented      |
50 | uid_received  | uid, received  |
51 | uid_pinned    | uid, pinned    |
52 | uid_commented | uid, commented |
53 | uid_starred   | uid, starred   |
54 | uid_mention   | uid, mention   |
55
56 Foreign Keys
57 ------------
58
59 | Field | Target Table | Target Field |
60 |-------|--------------|--------------|
61 | uri-id | [item-uri](help/database/db_item-uri) | id |
62 | owner-id | [contact](help/database/db_contact) | id |
63 | author-id | [contact](help/database/db_contact) | id |
64 | causer-id | [contact](help/database/db_contact) | id |
65 | uid | [user](help/database/db_user) | uid |
66 | contact-id | [contact](help/database/db_contact) | id |
67 | psid | [permissionset](help/database/db_permissionset) | id |
68 | post-user-id | [post-user](help/database/db_post-user) | id |
69
70 Return to [database documentation](help/database)