]> git.mxchange.org Git - friendica.git/blob - doc/database/db_attach.md
Merge pull request #12407 from HankG/friendica-api-photo-endpoint-updates
[friendica.git] / doc / database / db_attach.md
1 Table attach
2 ===========
3
4 file attachments
5
6 Fields
7 ------
8
9 | Field         | Description                                           | Type               | Null | Key | Default             | Extra          |
10 | ------------- | ----------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- |
11 | id            | generated index                                       | int unsigned       | NO   | PRI | NULL                | auto_increment |
12 | uid           | Owner User id                                         | mediumint unsigned | NO   |     | 0                   |                |
13 | hash          | hash                                                  | varchar(64)        | NO   |     |                     |                |
14 | filename      | filename of original                                  | varchar(255)       | NO   |     |                     |                |
15 | filetype      | mimetype                                              | varchar(64)        | NO   |     |                     |                |
16 | filesize      | size in bytes                                         | int unsigned       | NO   |     | 0                   |                |
17 | data          | file data                                             | longblob           | NO   |     | NULL                |                |
18 | created       | creation time                                         | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
19 | edited        | last edit time                                        | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
20 | allow_cid     | Access Control - list of allowed contact.id '<19><78> | mediumtext         | YES  |     | NULL                |                |
21 | allow_gid     | Access Control - list of allowed groups               | mediumtext         | YES  |     | NULL                |                |
22 | deny_cid      | Access Control - list of denied contact.id            | mediumtext         | YES  |     | NULL                |                |
23 | deny_gid      | Access Control - list of denied groups                | mediumtext         | YES  |     | NULL                |                |
24 | backend-class | Storage backend class                                 | tinytext           | YES  |     | NULL                |                |
25 | backend-ref   | Storage backend data reference                        | text               | YES  |     | NULL                |                |
26
27 Indexes
28 ------------
29
30 | Name    | Fields |
31 | ------- | ------ |
32 | PRIMARY | id     |
33 | uid     | uid    |
34
35 Foreign Keys
36 ------------
37
38 | Field | Target Table | Target Field |
39 |-------|--------------|--------------|
40 | uid | [user](help/database/db_user) | uid |
41
42 Return to [database documentation](help/database)