source: trunk/install/phpwebgallery_structure.sql @ 444

Last change on this file since 444 was 444, checked in by z0rglub, 20 years ago
  • moved index images.storage_category_id to images_i1
  • new index images_i2 on images.date_available
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.0 KB
Line 
1-- MySQL dump 8.21
2--
3-- Host: localhost    Database: pwg-bsf
4---------------------------------------------------------
5-- Server version       3.23.49-log
6
7--
8-- Table structure for table 'phpwebgallery_categories'
9--
10
11DROP TABLE IF EXISTS phpwebgallery_categories;
12CREATE TABLE phpwebgallery_categories (
13  id smallint(5) unsigned NOT NULL auto_increment,
14  date_last date default NULL,
15  nb_images mediumint(8) unsigned NOT NULL default '0',
16  name varchar(255) NOT NULL default '',
17  id_uppercat smallint(5) unsigned default NULL,
18  comment text,
19  dir varchar(255) default NULL,
20  rank tinyint(3) unsigned default NULL,
21  status enum('public','private') NOT NULL default 'public',
22  site_id tinyint(4) unsigned NOT NULL default '1',
23  visible enum('true','false') NOT NULL default 'true',
24  uploadable enum('true','false') NOT NULL default 'false',
25  representative_picture_id mediumint(8) unsigned default NULL,
26  uppercats varchar(255) NOT NULL default '',
27  PRIMARY KEY  (id),
28  KEY categories_i2 (id_uppercat)
29) TYPE=MyISAM;
30
31--
32-- Table structure for table 'phpwebgallery_comments'
33--
34
35DROP TABLE IF EXISTS phpwebgallery_comments;
36CREATE TABLE phpwebgallery_comments (
37  id int(11) unsigned NOT NULL auto_increment,
38  image_id mediumint(8) unsigned NOT NULL default '0',
39  date datetime NOT NULL default '0000-00-00 00:00:00',
40  author varchar(255) default NULL,
41  content longtext,
42  validated enum('true','false') NOT NULL default 'false',
43  PRIMARY KEY  (id)
44) TYPE=MyISAM;
45
46--
47-- Table structure for table 'phpwebgallery_config'
48--
49
50DROP TABLE IF EXISTS phpwebgallery_config;
51CREATE TABLE phpwebgallery_config (
52  param varchar(40) NOT NULL default '',
53  value varchar(255) default NULL,
54  comment varchar(255) default NULL,
55  PRIMARY KEY  (param)
56) TYPE=MyISAM COMMENT='configuration table';
57
58--
59-- Table structure for table 'phpwebgallery_favorites'
60--
61
62DROP TABLE IF EXISTS phpwebgallery_favorites;
63CREATE TABLE phpwebgallery_favorites (
64  user_id smallint(5) unsigned NOT NULL default '0',
65  image_id mediumint(8) unsigned NOT NULL default '0',
66  PRIMARY KEY  (user_id,image_id)
67) TYPE=MyISAM;
68
69--
70-- Table structure for table 'phpwebgallery_group_access'
71--
72
73DROP TABLE IF EXISTS phpwebgallery_group_access;
74CREATE TABLE phpwebgallery_group_access (
75  group_id smallint(5) unsigned NOT NULL default '0',
76  cat_id smallint(5) unsigned NOT NULL default '0',
77  PRIMARY KEY  (group_id,cat_id)
78) TYPE=MyISAM;
79
80--
81-- Table structure for table 'phpwebgallery_groups'
82--
83
84DROP TABLE IF EXISTS phpwebgallery_groups;
85CREATE TABLE phpwebgallery_groups (
86  id smallint(5) unsigned NOT NULL auto_increment,
87  name varchar(255) NOT NULL default '',
88  PRIMARY KEY  (id)
89) TYPE=MyISAM;
90
91--
92-- Table structure for table 'phpwebgallery_history'
93--
94
95DROP TABLE IF EXISTS phpwebgallery_history;
96CREATE TABLE phpwebgallery_history (
97  date int(11) NOT NULL default '0',
98  login varchar(15) default NULL,
99  IP varchar(50) NOT NULL default '',
100  category varchar(150) default NULL,
101  file varchar(50) default NULL,
102  picture varchar(150) default NULL
103) TYPE=MyISAM;
104
105--
106-- Table structure for table 'phpwebgallery_image_category'
107--
108
109DROP TABLE IF EXISTS phpwebgallery_image_category;
110CREATE TABLE phpwebgallery_image_category (
111  image_id mediumint(8) unsigned NOT NULL default '0',
112  category_id smallint(5) unsigned NOT NULL default '0',
113  PRIMARY KEY  (image_id,category_id),
114  KEY image_category_i1 (image_id),
115  KEY image_category_i2 (category_id)
116) TYPE=MyISAM;
117
118--
119-- Table structure for table 'phpwebgallery_images'
120--
121
122DROP TABLE IF EXISTS phpwebgallery_images;
123CREATE TABLE phpwebgallery_images (
124  id mediumint(8) unsigned NOT NULL auto_increment,
125  file varchar(255) NOT NULL default '',
126  date_available date NOT NULL default '0000-00-00',
127  date_creation date default NULL,
128  tn_ext char(3) NOT NULL default 'jpg',
129  name varchar(255) default NULL,
130  comment text,
131  author varchar(255) default NULL,
132  hit int(10) unsigned NOT NULL default '0',
133  filesize mediumint(9) unsigned default NULL,
134  width smallint(9) unsigned default NULL,
135  height smallint(9) unsigned default NULL,
136  keywords varchar(255) default NULL,
137  storage_category_id smallint(5) unsigned default NULL,
138  PRIMARY KEY  (id),
139  KEY images_i2 (date_available),
140  KEY images_i1 (storage_category_id)
141) TYPE=MyISAM;
142
143--
144-- Table structure for table 'phpwebgallery_sessions'
145--
146
147DROP TABLE IF EXISTS phpwebgallery_sessions;
148CREATE TABLE phpwebgallery_sessions (
149  id varchar(255) binary NOT NULL default '',
150  user_id smallint(5) unsigned NOT NULL default '0',
151  expiration int(10) unsigned NOT NULL default '0',
152  ip varchar(255) NOT NULL default '',
153  PRIMARY KEY  (id)
154) TYPE=MyISAM;
155
156--
157-- Table structure for table 'phpwebgallery_sites'
158--
159
160DROP TABLE IF EXISTS phpwebgallery_sites;
161CREATE TABLE phpwebgallery_sites (
162  id tinyint(4) NOT NULL auto_increment,
163  galleries_url varchar(255) NOT NULL default '',
164  PRIMARY KEY  (id),
165  UNIQUE KEY sites_ui1 (galleries_url)
166) TYPE=MyISAM;
167
168--
169-- Table structure for table 'phpwebgallery_user_access'
170--
171
172DROP TABLE IF EXISTS phpwebgallery_user_access;
173CREATE TABLE phpwebgallery_user_access (
174  user_id smallint(5) unsigned NOT NULL default '0',
175  cat_id smallint(5) unsigned NOT NULL default '0',
176  PRIMARY KEY  (user_id,cat_id)
177) TYPE=MyISAM;
178
179--
180-- Table structure for table 'phpwebgallery_user_group'
181--
182
183DROP TABLE IF EXISTS phpwebgallery_user_group;
184CREATE TABLE phpwebgallery_user_group (
185  user_id smallint(5) unsigned NOT NULL default '0',
186  group_id smallint(5) unsigned NOT NULL default '0',
187  PRIMARY KEY  (group_id,user_id)
188) TYPE=MyISAM;
189
190--
191-- Table structure for table 'phpwebgallery_users'
192--
193
194DROP TABLE IF EXISTS phpwebgallery_users;
195CREATE TABLE phpwebgallery_users (
196  id smallint(5) unsigned NOT NULL auto_increment,
197  username varchar(20) binary NOT NULL default '',
198  password varchar(255) NOT NULL default '',
199  mail_address varchar(255) default NULL,
200  nb_image_line tinyint(1) unsigned NOT NULL default '5',
201  nb_line_page tinyint(3) unsigned NOT NULL default '3',
202  status enum('admin','guest') NOT NULL default 'guest',
203  language varchar(50) NOT NULL default 'english',
204  maxwidth smallint(6) default NULL,
205  maxheight smallint(6) default NULL,
206  expand enum('true','false') NOT NULL default 'false',
207  show_nb_comments enum('true','false') NOT NULL default 'false',
208  short_period tinyint(3) unsigned NOT NULL default '7',
209  long_period tinyint(3) unsigned NOT NULL default '14',
210  template varchar(255) NOT NULL default 'default',
211  forbidden_categories text,
212  PRIMARY KEY  (id),
213  UNIQUE KEY users_ui1 (username)
214) TYPE=MyISAM;
215
216--
217-- Table structure for table 'phpwebgallery_waiting'
218--
219
220DROP TABLE IF EXISTS phpwebgallery_waiting;
221CREATE TABLE phpwebgallery_waiting (
222  id int(10) unsigned NOT NULL auto_increment,
223  storage_category_id smallint(5) unsigned NOT NULL default '0',
224  file varchar(255) NOT NULL default '',
225  username varchar(255) NOT NULL default '',
226  mail_address varchar(255) NOT NULL default '',
227  date int(10) unsigned NOT NULL default '0',
228  tn_ext char(3) default NULL,
229  validated enum('true','false') NOT NULL default 'false',
230  infos text,
231  PRIMARY KEY  (id)
232) TYPE=MyISAM;
233
Note: See TracBrowser for help on using the repository browser.