Changed field description
authorMichael <heluecht@pirati.ca>
Mon, 11 Oct 2021 17:21:29 +0000 (17:21 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 11 Oct 2021 17:21:29 +0000 (17:21 +0000)
database.sql
doc/database/db_photo.md
static/dbstructure.config.php

index d30ad46d7e719b5b5806078dcba959292b9f075f..b26a9d57ccdb5618bb678e90310f8cfa4d1fd535 100644 (file)
@@ -970,7 +970,7 @@ CREATE TABLE IF NOT EXISTS `photo` (
        `title` varchar(255) NOT NULL DEFAULT '' COMMENT '',
        `desc` text COMMENT '',
        `album` varchar(255) NOT NULL DEFAULT '' COMMENT 'The name of the album to which the photo belongs',
-       `photo-type` tinyint unsigned COMMENT 'User avatar, contact avatar or default',
+       `photo-type` tinyint unsigned COMMENT 'User avatar, user banner, contact avatar, contact banner or default',
        `filename` varchar(255) NOT NULL DEFAULT '' COMMENT '',
        `type` varchar(30) NOT NULL DEFAULT 'image/jpeg',
        `height` smallint unsigned NOT NULL DEFAULT 0 COMMENT '',
index 8f1905bc7d46cc0e75bc62a746905245c2c031f5..a93cf65f91f454e5dbde7252b45f151627298d92 100644 (file)
@@ -6,36 +6,36 @@ photo storage
 Fields
 ------
 
-| 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   |     |                     |                |
-| photo-type    | User avatar, contact avatar or default                 | tinyint unsigned   | YES  |     | NULL                |                |
-| 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                   |                |
-| 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                |                |
-| 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 |                |
+| 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   |     |                     |                |
+| photo-type    | User avatar, user banner, contact avatar, contact banner or default | tinyint unsigned   | YES  |     | NULL                |                |
+| 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                   |                |
+| 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                |                |
+| 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 |                |
 
 Indexes
 ------------
index 454d7c54e4a7f0c379427a53e6123c6a67b00d4b..e333c136f41423494b3ad0075804350c88ffe187 100644 (file)
@@ -1023,7 +1023,7 @@ return [
                        "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
                        "desc" => ["type" => "text", "comment" => ""],
                        "album" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "The name of the album to which the photo belongs"],
-                       "photo-type" => ["type" => "tinyint unsigned", "comment" => "User avatar, contact avatar or default"],
+                       "photo-type" => ["type" => "tinyint unsigned", "comment" => "User avatar, user banner, contact avatar, contact banner or default"],
                        "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
                        "type" => ["type" => "varchar(30)", "not null" => "1", "default" => "image/jpeg"],
                        "height" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],