]> git.mxchange.org Git - friendica.git/blob - doc/database/db_intro.md
Merge pull request #10882 from MrPetovan/task/10865-contact-purge
[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         | deprecated        | int unsigned       | YES  |     | NULL                |                |
14 | contact-id  |                   | int unsigned       | NO   |     | 0                   |                |
15 | suggest-cid | Suggested contact | int unsigned       | YES  |     | NULL                |                |
16 | knowyou     |                   | boolean            | NO   |     | 0                   |                |
17 | duplex      |                   | boolean            | NO   |     | 0                   |                |
18 | note        |                   | text               | YES  |     | NULL                |                |
19 | hash        |                   | varchar(255)       | NO   |     |                     |                |
20 | datetime    |                   | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
21 | blocked     |                   | boolean            | NO   |     | 1                   |                |
22 | ignore      |                   | boolean            | NO   |     | 0                   |                |
23
24 Indexes
25 ------------
26
27 | Name       | Fields     |
28 | ---------- | ---------- |
29 | PRIMARY    | id         |
30 | contact-id | contact-id |
31 | uid        | uid        |
32
33 Foreign Keys
34 ------------
35
36 | Field | Target Table | Target Field |
37 |-------|--------------|--------------|
38 | uid | [user](help/database/db_user) | uid |
39 | contact-id | [contact](help/database/db_contact) | id |
40 | suggest-cid | [contact](help/database/db_contact) | id |
41
42 Return to [database documentation](help/database)