]> git.mxchange.org Git - friendica.git/blob - doc/database/db_intro.md
Merge pull request #10362 from tobiasd/2021.06-CHANGELOG
[friendica.git] / doc / database / db_intro.md
1 Table intro
2 ===========
3
4
5
6 Fields
7 ------
8
9 | Field      | Description   | Type               | Null | Key | Default             | Extra          |
10 | ---------- | ------------- | ------------------ | ---- | --- | ------------------- | -------------- |
11 | id         | sequential ID | int unsigned       | NO   | PRI | NULL                | auto_increment |
12 | uid        | User id       | mediumint unsigned | NO   |     | 0                   |                |
13 | fid        |               | int unsigned       | YES  |     | NULL                |                |
14 | contact-id |               | int unsigned       | NO   |     | 0                   |                |
15 | knowyou    |               | boolean            | NO   |     | 0                   |                |
16 | duplex     |               | boolean            | NO   |     | 0                   |                |
17 | note       |               | text               | YES  |     | NULL                |                |
18 | hash       |               | varchar(255)       | NO   |     |                     |                |
19 | datetime   |               | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
20 | blocked    |               | boolean            | NO   |     | 1                   |                |
21 | ignore     |               | boolean            | NO   |     | 0                   |                |
22
23 Indexes
24 ------------
25
26 | Name       | Fields     |
27 | ---------- | ---------- |
28 | PRIMARY    | id         |
29 | contact-id | contact-id |
30 | uid        | uid        |
31
32 Foreign Keys
33 ------------
34
35 | Field | Target Table | Target Field |
36 |-------|--------------|--------------|
37 | uid | [user](help/database/db_user) | uid |
38 | contact-id | [contact](help/database/db_contact) | id |
39
40 Return to [database documentation](help/database)