From 298077dff661711fe55694f5e31931246e483495 Mon Sep 17 00:00:00 2001
From: z0rglub <z0rglub@piwigo.org>
Date: Sun, 11 Jan 2004 21:02:49 +0000
Subject:  - adding table user_category

 - adding field users.forbidden_categories

 - adding field categories.uppercats

 - adding indexes


git-svn-id: http://piwigo.org/svn/branches/release-1_3@273 68402e56-0260-453c-a942-63ccdbb3a9ee
---
 admin/phpwebgallery_structure.sql | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

(limited to 'admin/phpwebgallery_structure.sql')

diff --git a/admin/phpwebgallery_structure.sql b/admin/phpwebgallery_structure.sql
index d6797c162..d1c5343a6 100644
--- a/admin/phpwebgallery_structure.sql
+++ b/admin/phpwebgallery_structure.sql
@@ -1,6 +1,6 @@
 -- MySQL dump 8.21
 --
--- Host: localhost    Database: devel
+-- Host: localhost    Database: perfs_test
 ---------------------------------------------------------
 -- Server version	3.23.49-log
 
@@ -23,7 +23,10 @@ CREATE TABLE phpwebgallery_categories (
   visible enum('true','false') NOT NULL default 'true',
   uploadable enum('true','false') NOT NULL default 'false',
   representative_picture_id mediumint(8) unsigned default NULL,
-  PRIMARY KEY  (id)
+  uppercats varchar(255) NOT NULL default '',
+  PRIMARY KEY  (id),
+  KEY id (id),
+  KEY id_uppercat (id_uppercat)
 ) TYPE=MyISAM;
 
 --
@@ -125,7 +128,9 @@ DROP TABLE IF EXISTS phpwebgallery_image_category;
 CREATE TABLE phpwebgallery_image_category (
   image_id mediumint(8) unsigned NOT NULL default '0',
   category_id smallint(5) unsigned NOT NULL default '0',
-  PRIMARY KEY  (image_id,category_id)
+  PRIMARY KEY  (image_id,category_id),
+  KEY category_id (category_id),
+  KEY image_id (image_id)
 ) TYPE=MyISAM;
 
 --
@@ -188,6 +193,19 @@ CREATE TABLE phpwebgallery_user_access (
   PRIMARY KEY  (user_id,cat_id)
 ) TYPE=MyISAM;
 
+--
+-- Table structure for table 'phpwebgallery_user_category'
+--
+
+DROP TABLE IF EXISTS phpwebgallery_user_category;
+CREATE TABLE phpwebgallery_user_category (
+  user_id smallint(5) unsigned NOT NULL default '0',
+  category_id smallint(5) unsigned NOT NULL default '0',
+  date_last date default NULL,
+  nb_sub_categories smallint(5) unsigned NOT NULL default '0',
+  PRIMARY KEY  (user_id,category_id)
+) TYPE=MyISAM;
+
 --
 -- Table structure for table 'phpwebgallery_user_group'
 --
@@ -220,6 +238,7 @@ CREATE TABLE phpwebgallery_users (
   short_period tinyint(3) unsigned NOT NULL default '7',
   long_period tinyint(3) unsigned NOT NULL default '14',
   template varchar(255) NOT NULL default 'default',
+  forbidden_categories text,
   PRIMARY KEY  (id),
   UNIQUE KEY username (username)
 ) TYPE=MyISAM;
-- 
cgit v1.2.3

