diff options
Diffstat (limited to '')
-rw-r--r-- | install/dbscheme.txt | 7 | ||||
-rw-r--r-- | install/phpwebgallery_structure.sql | 13 |
2 files changed, 20 insertions, 0 deletions
diff --git a/install/dbscheme.txt b/install/dbscheme.txt index 913abe6e7..6661372f7 100644 --- a/install/dbscheme.txt +++ b/install/dbscheme.txt @@ -8,6 +8,7 @@ table:groups table:history table:image_category table:images +table:rate table:sessions table:sites table:user_access @@ -68,6 +69,10 @@ column:keywords table:images type:varchar column:storage_category_id table:images type:smallint nullable:N length:5 signed:N column:representative_ext table:images type:varchar nullable:N length:4 binary:N column:date_metadata_update table:images type:date nullable:N +column:average_rate table:images type:float nullable:N length:5,2 signed:N +column:user_id table:rate type:smallint nullable:Y length:5 signed:N +column:element_id table:rate type:mediumint nullable:Y length:8 signed:N +column:rate table:rate type:tinyint nullable:Y length:2 signed:N column:id table:sessions type:varchar nullable:Y length:255 binary:Y column:user_id table:sessions type:smallint nullable:Y length:5 signed:N column:expiration table:sessions type:int nullable:Y length:10 signed:N @@ -114,6 +119,8 @@ PK:groups_pk table:groups column:id PK:image_category_pk table:image_category column:image_id PK:image_category_pk table:image_category column:category_id PK:images_pk table:images column:id +PK:rate_pk table:rate column:user_id +PK:rate_pk table:rate column:element_id PK:sessions_pk table:sessions column:id PK:sites_pk table:sites column:id PK:user_access_pk table:user_access column:user_id diff --git a/install/phpwebgallery_structure.sql b/install/phpwebgallery_structure.sql index 06ea1cebf..3a387603b 100644 --- a/install/phpwebgallery_structure.sql +++ b/install/phpwebgallery_structure.sql @@ -137,12 +137,25 @@ CREATE TABLE phpwebgallery_images ( storage_category_id smallint(5) unsigned default NULL, representative_ext varchar(4) default NULL, date_metadata_update date default NULL, + average_rate float(5,2) unsigned default NULL, PRIMARY KEY (id), KEY images_i2 (date_available), KEY images_i1 (storage_category_id) ) TYPE=MyISAM; -- +-- Table structure for table 'phpwebgallery_rate' +-- + +DROP TABLE IF EXISTS phpwebgallery_rate; +CREATE TABLE phpwebgallery_rate ( + user_id smallint(5) unsigned NOT NULL default '0', + element_id mediumint(8) unsigned NOT NULL default '0', + rate tinyint(2) unsigned NOT NULL default '0', + PRIMARY KEY (user_id,element_id) +) TYPE=MyISAM; + +-- -- Table structure for table 'phpwebgallery_sessions' -- |