Subversion Repositories svnkaklik

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 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
 
11
DROP TABLE IF EXISTS phpwebgallery_categories;
12
CREATE 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 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
  commentable enum('true','false') NOT NULL default 'true',
28
  global_rank varchar(255) default NULL,
29
  PRIMARY KEY  (id),
30
  KEY categories_i2 (id_uppercat)
31
) TYPE=MyISAM;
32
 
33
--
34
-- Table structure for table 'phpwebgallery_comments'
35
--
36
 
37
DROP TABLE IF EXISTS phpwebgallery_comments;
38
CREATE TABLE phpwebgallery_comments (
39
  id int(11) unsigned NOT NULL auto_increment,
40
  image_id mediumint(8) unsigned NOT NULL default '0',
41
  date datetime NOT NULL default '0000-00-00 00:00:00',
42
  author varchar(255) default NULL,
43
  content longtext,
44
  validated enum('true','false') NOT NULL default 'false',
45
  PRIMARY KEY  (id)
46
) TYPE=MyISAM;
47
 
48
--
49
-- Table structure for table 'phpwebgallery_config'
50
--
51
 
52
DROP TABLE IF EXISTS phpwebgallery_config;
53
CREATE TABLE phpwebgallery_config (
54
  param varchar(40) NOT NULL default '',
55
  value varchar(255) default NULL,
56
  comment varchar(255) default NULL,
57
  PRIMARY KEY  (param)
58
) TYPE=MyISAM COMMENT='configuration table';
59
 
60
--
61
-- Table structure for table 'phpwebgallery_favorites'
62
--
63
 
64
DROP TABLE IF EXISTS phpwebgallery_favorites;
65
CREATE TABLE phpwebgallery_favorites (
66
  user_id smallint(5) unsigned NOT NULL default '0',
67
  image_id mediumint(8) unsigned NOT NULL default '0',
68
  PRIMARY KEY  (user_id,image_id)
69
) TYPE=MyISAM;
70
 
71
--
72
-- Table structure for table 'phpwebgallery_group_access'
73
--
74
 
75
DROP TABLE IF EXISTS phpwebgallery_group_access;
76
CREATE TABLE phpwebgallery_group_access (
77
  group_id smallint(5) unsigned NOT NULL default '0',
78
  cat_id smallint(5) unsigned NOT NULL default '0',
79
  PRIMARY KEY  (group_id,cat_id)
80
) TYPE=MyISAM;
81
 
82
--
83
-- Table structure for table 'phpwebgallery_groups'
84
--
85
 
86
DROP TABLE IF EXISTS phpwebgallery_groups;
87
CREATE TABLE phpwebgallery_groups (
88
  id smallint(5) unsigned NOT NULL auto_increment,
89
  name varchar(255) NOT NULL default '',
90
  PRIMARY KEY  (id)
91
) TYPE=MyISAM;
92
 
93
--
94
-- Table structure for table 'phpwebgallery_history'
95
--
96
 
97
DROP TABLE IF EXISTS phpwebgallery_history;
98
CREATE TABLE phpwebgallery_history (
99
  date datetime NOT NULL default '0000-00-00 00:00:00',
100
  login varchar(15) default NULL,
101
  IP varchar(50) NOT NULL default '',
102
  category varchar(150) default NULL,
103
  file varchar(50) default NULL,
104
  picture varchar(150) default NULL,
105
  KEY history_i1 (date)
106
) TYPE=MyISAM;
107
 
108
--
109
-- Table structure for table 'phpwebgallery_image_category'
110
--
111
 
112
DROP TABLE IF EXISTS phpwebgallery_image_category;
113
CREATE TABLE phpwebgallery_image_category (
114
  image_id mediumint(8) unsigned NOT NULL default '0',
115
  category_id smallint(5) unsigned NOT NULL default '0',
116
  PRIMARY KEY  (image_id,category_id),
117
  KEY image_category_i1 (image_id),
118
  KEY image_category_i2 (category_id)
119
) TYPE=MyISAM;
120
 
121
--
122
-- Table structure for table 'phpwebgallery_images'
123
--
124
 
125
DROP TABLE IF EXISTS phpwebgallery_images;
126
CREATE TABLE phpwebgallery_images (
127
  id mediumint(8) unsigned NOT NULL auto_increment,
128
  file varchar(255) NOT NULL default '',
129
  date_available date NOT NULL default '0000-00-00',
130
  date_creation date default NULL,
131
  tn_ext varchar(4) default '',
132
  name varchar(255) default NULL,
133
  comment text,
134
  author varchar(255) default NULL,
135
  hit int(10) unsigned NOT NULL default '0',
136
  filesize mediumint(9) unsigned default NULL,
137
  width smallint(9) unsigned default NULL,
138
  height smallint(9) unsigned default NULL,
139
  keywords varchar(255) default NULL,
140
  storage_category_id smallint(5) unsigned default NULL,
141
  representative_ext varchar(4) default NULL,
142
  date_metadata_update date default NULL,
143
  average_rate float(5,2) unsigned default NULL,
144
  path varchar(255) NOT NULL default '',
145
  PRIMARY KEY  (id),
146
  KEY images_i2 (date_available),
147
  KEY images_i1 (storage_category_id),
148
  KEY images_i3 (average_rate),
149
  KEY images_i4 (hit),
150
  KEY images_i5 (date_creation)
151
) TYPE=MyISAM;
152
 
153
--
154
-- Table structure for table 'phpwebgallery_rate'
155
--
156
 
157
DROP TABLE IF EXISTS phpwebgallery_rate;
158
CREATE TABLE phpwebgallery_rate (
159
  user_id smallint(5) unsigned NOT NULL default '0',
160
  element_id mediumint(8) unsigned NOT NULL default '0',
161
  rate tinyint(2) unsigned NOT NULL default '0',
162
  PRIMARY KEY  (user_id,element_id)
163
) TYPE=MyISAM;
164
 
165
--
166
-- Table structure for table 'phpwebgallery_sessions'
167
--
168
 
169
DROP TABLE IF EXISTS phpwebgallery_sessions;
170
CREATE TABLE phpwebgallery_sessions (
171
  id varchar(255) binary NOT NULL default '',
172
  user_id smallint(5) unsigned NOT NULL default '0',
173
  expiration datetime NOT NULL default '0000-00-00 00:00:00',
174
  PRIMARY KEY  (id)
175
) TYPE=MyISAM;
176
 
177
--
178
-- Table structure for table 'phpwebgallery_sites'
179
--
180
 
181
DROP TABLE IF EXISTS phpwebgallery_sites;
182
CREATE TABLE phpwebgallery_sites (
183
  id tinyint(4) NOT NULL auto_increment,
184
  galleries_url varchar(255) NOT NULL default '',
185
  PRIMARY KEY  (id),
186
  UNIQUE KEY sites_ui1 (galleries_url)
187
) TYPE=MyISAM;
188
 
189
--
190
-- Table structure for table 'phpwebgallery_user_access'
191
--
192
 
193
DROP TABLE IF EXISTS phpwebgallery_user_access;
194
CREATE TABLE phpwebgallery_user_access (
195
  user_id smallint(5) unsigned NOT NULL default '0',
196
  cat_id smallint(5) unsigned NOT NULL default '0',
197
  PRIMARY KEY  (user_id,cat_id)
198
) TYPE=MyISAM;
199
 
200
--
201
-- Table structure for table 'phpwebgallery_user_forbidden'
202
--
203
 
204
DROP TABLE IF EXISTS phpwebgallery_user_forbidden;
205
CREATE TABLE phpwebgallery_user_forbidden (
206
  user_id smallint(5) unsigned NOT NULL default '0',
207
  need_update enum('true','false') NOT NULL default 'true',
208
  forbidden_categories text,
209
  PRIMARY KEY  (user_id)
210
) TYPE=MyISAM;
211
 
212
--
213
-- Table structure for table 'phpwebgallery_user_group'
214
--
215
 
216
DROP TABLE IF EXISTS phpwebgallery_user_group;
217
CREATE TABLE phpwebgallery_user_group (
218
  user_id smallint(5) unsigned NOT NULL default '0',
219
  group_id smallint(5) unsigned NOT NULL default '0',
220
  PRIMARY KEY  (group_id,user_id)
221
) TYPE=MyISAM;
222
 
223
--
224
-- Table structure for table 'phpwebgallery_users'
225
--
226
 
227
DROP TABLE IF EXISTS phpwebgallery_users;
228
CREATE TABLE phpwebgallery_users (
229
  id smallint(5) unsigned NOT NULL auto_increment,
230
  username varchar(20) binary NOT NULL default '',
231
  password varchar(255) NOT NULL default '',
232
  mail_address varchar(255) default NULL,
233
  nb_image_line tinyint(1) unsigned NOT NULL default '5',
234
  nb_line_page tinyint(3) unsigned NOT NULL default '3',
235
  status enum('admin','guest') NOT NULL default 'guest',
236
  language varchar(50) NOT NULL default 'english',
237
  maxwidth smallint(6) default NULL,
238
  maxheight smallint(6) default NULL,
239
  expand enum('true','false') NOT NULL default 'false',
240
  show_nb_comments enum('true','false') NOT NULL default 'false',
241
  recent_period tinyint(3) unsigned NOT NULL default '7',
242
  template varchar(255) NOT NULL default 'default',
243
  PRIMARY KEY  (id),
244
  UNIQUE KEY users_ui1 (username)
245
) TYPE=MyISAM;
246
 
247
--
248
-- Table structure for table 'phpwebgallery_waiting'
249
--
250
 
251
DROP TABLE IF EXISTS phpwebgallery_waiting;
252
CREATE TABLE phpwebgallery_waiting (
253
  id int(10) unsigned NOT NULL auto_increment,
254
  storage_category_id smallint(5) unsigned NOT NULL default '0',
255
  file varchar(255) NOT NULL default '',
256
  username varchar(255) NOT NULL default '',
257
  mail_address varchar(255) NOT NULL default '',
258
  date int(10) unsigned NOT NULL default '0',
259
  tn_ext char(3) default NULL,
260
  validated enum('true','false') NOT NULL default 'false',
261
  infos text,
262
  PRIMARY KEY  (id)
263
) TYPE=MyISAM;
264