]> git.mxchange.org Git - friendica.git/blobdiff - doc/database/db_photo.md
2021.09 CHANGELOG some more work has been done
[friendica.git] / doc / database / db_photo.md
index 168797a1fb09c88df963670538a4a376495e0599..b641ae4596ecfbd76d52f575ddcf2dca66b1f2f3 100644 (file)
@@ -3,6 +3,9 @@ Table photo
 
 photo storage
 
+Fields
+------
+
 | Field         | Description                                            | Type               | Null | Key | Default             | Extra          |
 | ------------- | ------------------------------------------------------ | ------------------ | ---- | --- | ------------------- | -------------- |
 | id            | sequential ID                                          | int unsigned       | NO   | PRI | NULL                | auto_increment |
@@ -24,7 +27,7 @@ photo storage
 | data          |                                                        | mediumblob         | NO   |     | NULL                |                |
 | scale         |                                                        | tinyint unsigned   | NO   |     | 0                   |                |
 | profile       |                                                        | boolean            | NO   |     | 0                   |                |
-| allow_cid     | Access Control - list of allowed contact.id '<19><78>' | mediumtext         | YES  |     | NULL                |                |
+| 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                |                |
@@ -33,4 +36,25 @@ photo storage
 | backend-ref   | Storage backend data reference                         | text               | YES  |     | NULL                |                |
 | updated       |                                                        | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
 
+Indexes
+------------
+
+| Name                          | Fields                               |
+| ----------------------------- | ------------------------------------ |
+| PRIMARY                       | id                                   |
+| contactid                     | contact-id                           |
+| uid_contactid                 | uid, contact-id                      |
+| uid_profile                   | uid, profile                         |
+| uid_album_scale_created       | uid, album(32), scale, created       |
+| uid_album_resource-id_created | uid, album(32), resource-id, created |
+| resource-id                   | resource-id                          |
+
+Foreign Keys
+------------
+
+| Field | Target Table | Target Field |
+|-------|--------------|--------------|
+| uid | [user](help/database/db_user) | uid |
+| contact-id | [contact](help/database/db_contact) | id |
+
 Return to [database documentation](help/database)