source: trunk/install/phpwebgallery_structure.sql @ 431

Last change on this file since 431 was 423, checked in by z0rglub, 20 years ago

table user_category dropped

  • 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 storage_category_id (storage_category_id)
140) TYPE=MyISAM;
141
142--
143-- Table structure for table 'phpwebgallery_sessions'
144--
145
146DROP TABLE IF EXISTS phpwebgallery_sessions;
147CREATE TABLE phpwebgallery_sessions (
148  id varchar(255) binary NOT NULL default '',
149  user_id smallint(5) unsigned NOT NULL default '0',
150  expiration int(10) unsigned NOT NULL default '0',
151  ip varchar(255) NOT NULL default '',
152  PRIMARY KEY  (id)
153) TYPE=MyISAM;
154
155--
156-- Table structure for table 'phpwebgallery_sites'
157--
158
159DROP TABLE IF EXISTS phpwebgallery_sites;
160CREATE TABLE phpwebgallery_sites (
161  id tinyint(4) NOT NULL auto_increment,
162  galleries_url varchar(255) NOT NULL default '',
163  PRIMARY KEY  (id),
164  UNIQUE KEY sites_ui1 (galleries_url)
165) TYPE=MyISAM;
166
167--
168-- Table structure for table 'phpwebgallery_user_access'
169--
170
171DROP TABLE IF EXISTS phpwebgallery_user_access;
172CREATE TABLE phpwebgallery_user_access (
173  user_id smallint(5) unsigned NOT NULL default '0',
174  cat_id smallint(5) unsigned NOT NULL default '0',
175  PRIMARY KEY  (user_id,cat_id)
176) TYPE=MyISAM;
177
178--
179-- Table structure for table 'phpwebgallery_user_group'
180--
181
182DROP TABLE IF EXISTS phpwebgallery_user_group;
183CREATE TABLE phpwebgallery_user_group (
184  user_id smallint(5) unsigned NOT NULL default '0',
185  group_id smallint(5) unsigned NOT NULL default '0',
186  PRIMARY KEY  (group_id,user_id)
187) TYPE=MyISAM;
188
189--
190-- Table structure for table 'phpwebgallery_users'
191--
192
193DROP TABLE IF EXISTS phpwebgallery_users;
194CREATE TABLE phpwebgallery_users (
195  id smallint(5) unsigned NOT NULL auto_increment,
196  username varchar(20) binary NOT NULL default '',
197  password varchar(255) NOT NULL default '',
198  mail_address varchar(255) default NULL,
199  nb_image_line tinyint(1) unsigned NOT NULL default '5',
200  nb_line_page tinyint(3) unsigned NOT NULL default '3',
201  status enum('admin','guest') NOT NULL default 'guest',
202  language varchar(50) NOT NULL default 'english',
203  maxwidth smallint(6) default NULL,
204  maxheight smallint(6) default NULL,
205  expand enum('true','false') NOT NULL default 'false',
206  show_nb_comments enum('true','false') NOT NULL default 'false',
207  short_period tinyint(3) unsigned NOT NULL default '7',
208  long_period tinyint(3) unsigned NOT NULL default '14',
209  template varchar(255) NOT NULL default 'default',
210  forbidden_categories text,
211  PRIMARY KEY  (id),
212  UNIQUE KEY users_ui1 (username)
213) TYPE=MyISAM;
214
215--
216-- Table structure for table 'phpwebgallery_waiting'
217--
218
219DROP TABLE IF EXISTS phpwebgallery_waiting;
220CREATE TABLE phpwebgallery_waiting (
221  id int(10) unsigned NOT NULL auto_increment,
222  storage_category_id smallint(5) unsigned NOT NULL default '0',
223  file varchar(255) NOT NULL default '',
224  username varchar(255) NOT NULL default '',
225  mail_address varchar(255) NOT NULL default '',
226  date int(10) unsigned NOT NULL default '0',
227  tn_ext char(3) default NULL,
228  validated enum('true','false') NOT NULL default 'false',
229  infos text,
230  PRIMARY KEY  (id)
231) TYPE=MyISAM;
232
Note: See TracBrowser for help on using the repository browser.