1
1
Fork 0
friendica_2019-12_sharedHos.../doc/database/db_photo.md

61 lines
5.2 KiB
Markdown
Raw Normal View History

2015-12-28 02:50:25 +01:00
Table photo
===========
2021-06-14 08:10:11 +02:00
photo storage
2015-12-28 02:50:25 +01:00
2021-06-14 10:53:37 +02:00
Fields
------
2021-06-14 08:10:11 +02:00
| Field | Description | Type | Null | Key | Default | Extra |
| ------------- | ------------------------------------------------------ | ------------------ | ---- | --- | ------------------- | -------------- |
| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment |
| uid | Owner User id | mediumint unsigned | NO | | 0 | |
| contact-id | contact.id | int unsigned | NO | | 0 | |
| guid | A unique identifier for this photo | char(16) | NO | | | |
| resource-id | | char(32) | NO | | | |
| hash | hash value of the photo | char(32) | YES | | NULL | |
| created | creation date | datetime | NO | | 0001-01-01 00:00:00 | |
| edited | last edited date | datetime | NO | | 0001-01-01 00:00:00 | |
| title | | varchar(255) | NO | | | |
| desc | | text | YES | | NULL | |
| album | The name of the album to which the photo belongs | varchar(255) | NO | | | |
| filename | | varchar(255) | NO | | | |
| type | | varchar(30) | NO | | image/jpeg | |
| height | | smallint unsigned | NO | | 0 | |
| width | | smallint unsigned | NO | | 0 | |
| datasize | | int unsigned | NO | | 0 | |
| data | | mediumblob | NO | | NULL | |
| scale | | tinyint unsigned | NO | | 0 | |
| profile | | boolean | NO | | 0 | |
2021-06-14 14:38:42 +02:00
| allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | |
2021-06-14 08:10:11 +02:00
| 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 | |
| accessible | Make photo publicly accessible, ignoring permissions | boolean | NO | | 0 | |
| backend-class | Storage backend class | tinytext | YES | | NULL | |
| backend-ref | Storage backend data reference | text | YES | | NULL | |
| updated | | datetime | NO | | 0001-01-01 00:00:00 | |
2015-12-28 02:50:25 +01:00
2021-06-14 10:53:37 +02:00
Indexes
------------
2021-06-14 14:15:10 +02:00
| 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 |
2021-06-14 10:53:37 +02:00
| uid_album_resource-id_created | uid, album(32), resource-id, created |
2021-06-14 14:15:10 +02:00
| resource-id | resource-id |
2021-06-14 10:53:37 +02:00
Foreign Keys
------------
| Field | Target Table | Target Field |
|-------|--------------|--------------|
| uid | [user](help/database/db_user) | uid |
| contact-id | [contact](help/database/db_contact) | id |
2015-12-28 02:50:25 +01:00
Return to [database documentation](help/database)