]> git.mxchange.org Git - friendica.git/blob - doc/database/db_post-thread-user.md
Merge remote-tracking branch 'upstream/develop' into enqueue-posts
[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 | conversation-id | Id of the item-uri table entry that contains the conversation uri                                       | int unsigned       | YES  |     | NULL                |       |
13 | owner-id        | Item owner                                                                                              | int unsigned       | NO   |     | 0                   |       |
14 | author-id       | Item author                                                                                             | int unsigned       | NO   |     | 0                   |       |
15 | causer-id       | Link to the contact table with uid=0 of the contact that caused the item creation                       | int unsigned       | YES  |     | NULL                |       |
16 | network         |                                                                                                         | char(4)            | NO   |     |                     |       |
17 | created         |                                                                                                         | datetime           | NO   |     | 0001-01-01 00:00:00 |       |
18 | received        |                                                                                                         | datetime           | NO   |     | 0001-01-01 00:00:00 |       |
19 | changed         | Date that something in the conversation changed, indicating clients should fetch the conversation again | datetime           | NO   |     | 0001-01-01 00:00:00 |       |
20 | commented       |                                                                                                         | datetime           | NO   |     | 0001-01-01 00:00:00 |       |
21 | uid             | Owner id which owns this copy of the item                                                               | mediumint unsigned | NO   | PRI | 0                   |       |
22 | pinned          | deprecated                                                                                              | boolean            | NO   |     | 0                   |       |
23 | starred         |                                                                                                         | boolean            | NO   |     | 0                   |       |
24 | ignored         | Ignore updates for this thread                                                                          | boolean            | NO   |     | 0                   |       |
25 | wall            | This item was posted to the wall of uid                                                                 | boolean            | NO   |     | 0                   |       |
26 | mention         |                                                                                                         | boolean            | NO   |     | 0                   |       |
27 | pubmail         |                                                                                                         | boolean            | NO   |     | 0                   |       |
28 | forum_mode      | Deprecated                                                                                              | tinyint unsigned   | NO   |     | 0                   |       |
29 | contact-id      | contact.id                                                                                              | int unsigned       | NO   |     | 0                   |       |
30 | unseen          | post has not been seen                                                                                  | boolean            | NO   |     | 1                   |       |
31 | hidden          | Marker to hide the post from the user                                                                   | boolean            | NO   |     | 0                   |       |
32 | origin          | item originated at this site                                                                            | boolean            | NO   |     | 0                   |       |
33 | psid            | ID of the permission set of this post                                                                   | int unsigned       | YES  |     | NULL                |       |
34 | post-user-id    | Id of the post-user table                                                                               | int unsigned       | YES  |     | NULL                |       |
35
36 Indexes
37 ------------
38
39 | Name              | Fields              |
40 | ----------------- | ------------------- |
41 | PRIMARY           | uid, uri-id         |
42 | uri-id            | uri-id              |
43 | conversation-id   | conversation-id     |
44 | owner-id          | owner-id            |
45 | author-id         | author-id           |
46 | causer-id         | causer-id           |
47 | uid               | uid                 |
48 | contact-id        | contact-id          |
49 | psid              | psid                |
50 | post-user-id      | post-user-id        |
51 | commented         | commented           |
52 | uid_received      | uid, received       |
53 | uid_wall_received | uid, wall, received |
54 | uid_commented     | uid, commented      |
55 | uid_starred       | uid, starred        |
56 | uid_mention       | uid, mention        |
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 | conversation-id | [item-uri](help/database/db_item-uri) | id |
65 | owner-id | [contact](help/database/db_contact) | id |
66 | author-id | [contact](help/database/db_contact) | id |
67 | causer-id | [contact](help/database/db_contact) | id |
68 | uid | [user](help/database/db_user) | uid |
69 | contact-id | [contact](help/database/db_contact) | id |
70 | psid | [permissionset](help/database/db_permissionset) | id |
71 | post-user-id | [post-user](help/database/db_post-user) | id |
72
73 Return to [database documentation](help/database)