]> git.mxchange.org Git - friendica.git/blobdiff - doc/database/db_attach.md
Merge pull request #12407 from HankG/friendica-api-photo-endpoint-updates
[friendica.git] / doc / database / db_attach.md
index e35003c368878a62318a94aed0d1e9d1514fd568..76d8e01f2094a64c1fc38eac7b39cefcfe82195c 100644 (file)
@@ -1,23 +1,42 @@
 Table attach
 ===========
+
 file attachments
 
-| Field | Description | Type | Null | Key | Default | Extra |
-| ----- | ----------- | ---- | ---- | --- | ------- | ----- |
-| id | generated index | int unsigned | YES | PRI |  | auto_increment |    
-| uid | Owner User id | mediumint unsigned | YES |  | 0 |  |    
-| hash | hash | varchar(64) | YES |  |  |  |    
-| filename | filename of original | varchar(255) | YES |  |  |  |    
-| filetype | mimetype | varchar(64) | YES |  |  |  |    
-| filesize | size in bytes | int unsigned | YES |  | 0 |  |    
-| data | file data | longblob | YES |  |  |  |    
-| created | creation time | datetime | YES |  | 0001-01-01 00:00:00 |  |    
-| edited | last edit time | datetime | YES |  | 0001-01-01 00:00:00 |  |    
-| allow_cid | Access Control - list of allowed contact.id '<19><78> | mediumtext | NO |  |  |  |    
-| allow_gid | Access Control - list of allowed groups | mediumtext | NO |  |  |  |    
-| deny_cid | Access Control - list of denied contact.id | mediumtext | NO |  |  |  |    
-| deny_gid | Access Control - list of denied groups | mediumtext | NO |  |  |  |    
-| backend-class | Storage backend class | tinytext | NO |  |  |  |    
-| backend-ref | Storage backend data reference | text | NO |  |  |  |    
+Fields
+------
+
+| Field         | Description                                           | Type               | Null | Key | Default             | Extra          |
+| ------------- | ----------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- |
+| id            | generated index                                       | int unsigned       | NO   | PRI | NULL                | auto_increment |
+| uid           | Owner User id                                         | mediumint unsigned | NO   |     | 0                   |                |
+| hash          | hash                                                  | varchar(64)        | NO   |     |                     |                |
+| filename      | filename of original                                  | varchar(255)       | NO   |     |                     |                |
+| filetype      | mimetype                                              | varchar(64)        | NO   |     |                     |                |
+| filesize      | size in bytes                                         | int unsigned       | NO   |     | 0                   |                |
+| data          | file data                                             | longblob           | NO   |     | NULL                |                |
+| created       | creation time                                         | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
+| edited        | last edit time                                        | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
+| allow_cid     | Access Control - list of allowed contact.id '<19><78> | mediumtext         | YES  |     | NULL                |                |
+| allow_gid     | Access Control - list of allowed groups               | mediumtext         | YES  |     | NULL                |                |
+| deny_cid      | Access Control - list of denied contact.id            | mediumtext         | YES  |     | NULL                |                |
+| deny_gid      | Access Control - list of denied groups                | mediumtext         | YES  |     | NULL                |                |
+| backend-class | Storage backend class                                 | tinytext           | YES  |     | NULL                |                |
+| backend-ref   | Storage backend data reference                        | text               | YES  |     | NULL                |                |
+
+Indexes
+------------
+
+| Name    | Fields |
+| ------- | ------ |
+| PRIMARY | id     |
+| uid     | uid    |
+
+Foreign Keys
+------------
+
+| Field | Target Table | Target Field |
+|-------|--------------|--------------|
+| uid | [user](help/database/db_user) | uid |
 
 Return to [database documentation](help/database)