2 phpBB2 PostgreSQL DB schema - phpBB group 2001
5 $Id: postgres_schema.sql,v 1.1.2.7 2005/12/29 11:51:12 acydburn Exp $
8 CREATE SEQUENCE phpbb_banlist_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
9 CREATE SEQUENCE phpbb_categories_id_seq start 2 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
10 CREATE SEQUENCE phpbb_disallow_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
11 CREATE SEQUENCE phpbb_posts_id_seq start 2 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
12 CREATE SEQUENCE phpbb_privmsgs_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
13 CREATE SEQUENCE phpbb_ranks_id_seq start 2 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
14 CREATE SEQUENCE phpbb_search_wordlist_id_seq start 13 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
15 CREATE SEQUENCE phpbb_smilies_id_seq start 42 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
16 CREATE SEQUENCE phpbb_themes_id_seq start 7 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
17 CREATE SEQUENCE phpbb_topics_id_seq start 2 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
18 CREATE SEQUENCE phpbb_users_id_seq start 3 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
19 CREATE SEQUENCE phpbb_words_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
20 CREATE SEQUENCE phpbb_groups_id_seq start 3 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
21 CREATE SEQUENCE phpbb_forum_prune_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
22 CREATE SEQUENCE phpbb_vote_desc_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
24 /* --------------------------------------------------------
25 Table structure for table phpbb_auth_access
26 -------------------------------------------------------- */
27 CREATE TABLE phpbb_auth_access (
28 group_id int DEFAULT '0' NOT NULL,
29 forum_id int2 DEFAULT '0' NOT NULL,
30 auth_view int2 DEFAULT '0' NOT NULL,
31 auth_read int2 DEFAULT '0' NOT NULL,
32 auth_post int2 DEFAULT '0' NOT NULL,
33 auth_reply int2 DEFAULT '0' NOT NULL,
34 auth_edit int2 DEFAULT '0' NOT NULL,
35 auth_delete int2 DEFAULT '0' NOT NULL,
36 auth_sticky int2 DEFAULT '0' NOT NULL,
37 auth_announce int2 DEFAULT '0' NOT NULL,
38 auth_vote int2 DEFAULT '0' NOT NULL,
39 auth_pollcreate int2 DEFAULT '0' NOT NULL,
40 auth_attachments int2 DEFAULT '0' NOT NULL,
41 auth_mod int2 DEFAULT '0' NOT NULL,
42 CONSTRAINT phpbb_auth_access_pkey PRIMARY KEY (group_id, forum_id)
46 /* --------------------------------------------------------
47 Table structure for table phpbb_confirm
48 -------------------------------------------------------- */
49 CREATE TABLE phpbb_confirm (
50 confirm_id char(32) DEFAULT '' NOT NULL,
51 session_id char(32) DEFAULT '' NOT NULL,
52 code char(6) DEFAULT '' NOT NULL,
53 CONSTRAINT phpbb_confirm_pkey PRIMARY KEY (session_id, confirm_id)
57 /* --------------------------------------------------------
58 Table structure for table phpbb_groups
59 -------------------------------------------------------- */
60 CREATE TABLE phpbb_groups (
61 group_id int DEFAULT nextval('phpbb_groups_id_seq'::text) NOT NULL,
62 group_name varchar(40) NOT NULL,
63 group_type int2 DEFAULT '1' NOT NULL,
64 group_description varchar(255) NOT NULL,
65 group_moderator int4 DEFAULT '0' NOT NULL,
66 group_single_user int2 DEFAULT '0' NOT NULL,
67 CONSTRAINT phpbb_groups_pkey PRIMARY KEY (group_id)
71 /* --------------------------------------------------------
72 Table structure for table phpbb_banlist
73 -------------------------------------------------------- */
74 CREATE TABLE phpbb_banlist (
75 ban_id int4 DEFAULT nextval('phpbb_banlist_id_seq'::text) NOT NULL,
78 ban_email varchar(255),
79 CONSTRAINT phpbb_banlist_pkey PRIMARY KEY (ban_id)
81 CREATE INDEX ban_userid_phpbb_banlist_index ON phpbb_banlist (ban_userid);
84 /* --------------------------------------------------------
85 Table structure for table phpbb_categories
86 -------------------------------------------------------- */
87 CREATE TABLE phpbb_categories (
88 cat_id int4 DEFAULT nextval('phpbb_categories_id_seq'::text) NOT NULL,
89 cat_title varchar(100),
91 CONSTRAINT phpbb_categories_pkey PRIMARY KEY (cat_id)
95 /* --------------------------------------------------------
96 Table structure for table phpbb_config
97 -------------------------------------------------------- */
98 CREATE TABLE phpbb_config (
99 config_name varchar(255) NOT NULL,
100 config_value varchar(255) NOT NULL,
101 CONSTRAINT phpbb_config_pkey PRIMARY KEY (config_name)
105 /* --------------------------------------------------------
106 Table structure for table phpbb_disallow
107 -------------------------------------------------------- */
108 CREATE TABLE phpbb_disallow (
109 disallow_id int4 DEFAULT nextval('phpbb_disallow_id_seq'::text) NOT NULL,
110 disallow_username varchar(25),
111 CONSTRAINT phpbb_disallow_pkey PRIMARY KEY (disallow_id)
115 /* --------------------------------------------------------
116 Table structure for table phpbb_forums
117 -------------------------------------------------------- */
118 CREATE TABLE phpbb_forums (
119 forum_id int4 DEFAULT '0' NOT NULL,
121 forum_name varchar(150),
123 forum_status int2 DEFAULT '0' NOT NULL,
124 forum_order int4 DEFAULT '1' NOT NULL,
125 forum_posts int4 DEFAULT '0' NOT NULL,
126 forum_topics int4 DEFAULT '0' NOT NULL,
127 forum_last_post_id int4 DEFAULT '0' NOT NULL,
128 prune_enable int2 DEFAULT '0' NOT NULL,
130 auth_view int2 DEFAULT '0' NOT NULL,
131 auth_read int2 DEFAULT '0' NOT NULL,
132 auth_post int2 DEFAULT '0' NOT NULL,
133 auth_reply int2 DEFAULT '0' NOT NULL,
134 auth_edit int2 DEFAULT '0' NOT NULL,
135 auth_delete int2 DEFAULT '0' NOT NULL,
136 auth_announce int2 DEFAULT '0' NOT NULL,
137 auth_sticky int2 DEFAULT '0' NOT NULL,
138 auth_pollcreate int2 DEFAULT '0' NOT NULL,
139 auth_vote int2 DEFAULT '0' NOT NULL,
140 auth_attachments int2 DEFAULT '0' NOT NULL,
141 CONSTRAINT phpbb_forums_pkey PRIMARY KEY (forum_id)
143 CREATE INDEX cat_id_phpbb_forums_index ON phpbb_forums (cat_id);
144 CREATE INDEX forum_id_phpbb_forums_index ON phpbb_forums (forum_id);
145 CREATE INDEX forums_order_phpbb_forums_index ON phpbb_forums (forum_order);
146 CREATE INDEX forum_last_post_id_phpbb_forums_index ON phpbb_forums (forum_last_post_id);
149 /* --------------------------------------------------------
150 Table structure for table phpbb_forum_prune
151 -------------------------------------------------------- */
152 CREATE TABLE phpbb_forum_prune (
153 prune_id int4 DEFAULT nextval('phpbb_forum_prune_id_seq'::text) NOT NULL,
154 forum_id int4 NOT NULL,
155 prune_days int4 NOT NULL,
156 prune_freq int4 NOT NULL,
157 CONSTRAINT phpbb_forum_prune_pkey PRIMARY KEY (prune_id)
159 CREATE INDEX prune_id_phpbb_forum_prune_index ON phpbb_forum_prune (prune_id);
160 CREATE INDEX forum_id_phpbb_forum_prune_index ON phpbb_forum_prune (forum_id);
163 /* --------------------------------------------------------
164 Table structure for table phpbb_posts
165 -------------------------------------------------------- */
166 CREATE TABLE phpbb_posts (
167 post_id int4 DEFAULT nextval('phpbb_posts_id_seq'::text) NOT NULL,
168 topic_id int4 DEFAULT '0' NOT NULL,
169 forum_id int4 DEFAULT '0' NOT NULL,
170 poster_id int4 DEFAULT '0' NOT NULL,
171 post_time int4 DEFAULT '0' NOT NULL,
172 post_username varchar(25),
173 poster_ip char(8) DEFAULT '' NOT NULL,
174 enable_bbcode int2 DEFAULT '1' NOT NULL,
175 enable_html int2 DEFAULT '0' NOT NULL,
176 enable_smilies int2 DEFAULT '1' NOT NULL,
177 enable_sig int2 DEFAULT '1' NOT NULL,
179 post_edit_count int2 DEFAULT '0' NOT NULL,
180 CONSTRAINT phpbb_posts_pkey PRIMARY KEY (post_id)
182 CREATE INDEX forum_id_phpbb_posts_index ON phpbb_posts (forum_id);
183 CREATE INDEX post_time_phpbb_posts_index ON phpbb_posts (post_time);
184 CREATE INDEX poster_id_phpbb_posts_index ON phpbb_posts (poster_id);
185 CREATE INDEX topic_id_phpbb_posts_index ON phpbb_posts (topic_id);
188 /* --------------------------------------------------------
189 Table structure for table phpbb_posts_text
190 -------------------------------------------------------- */
191 CREATE TABLE phpbb_posts_text (
192 post_id int4 DEFAULT '0' NOT NULL,
193 bbcode_uid varchar(10) DEFAULT '' NOT NULL,
194 post_subject varchar(60),
196 CONSTRAINT phpbb_posts_text_pkey PRIMARY KEY (post_id)
200 /* --------------------------------------------------------
201 Table structure for table phpbb_privmsgs
202 -------------------------------------------------------- */
203 CREATE TABLE phpbb_privmsgs (
204 privmsgs_id int4 DEFAULT nextval('phpbb_privmsgs_id_seq'::text) NOT NULL,
205 privmsgs_type int2 DEFAULT '0' NOT NULL,
206 privmsgs_subject varchar(255) DEFAULT '0' NOT NULL,
207 privmsgs_from_userid int4 DEFAULT '0' NOT NULL,
208 privmsgs_to_userid int4 DEFAULT '0' NOT NULL,
209 privmsgs_date int4 DEFAULT '0' NOT NULL,
210 privmsgs_ip char(8) NOT NULL,
211 privmsgs_enable_bbcode int2 DEFAULT '1' NOT NULL,
212 privmsgs_enable_html int2 DEFAULT '0' NOT NULL,
213 privmsgs_enable_smilies int2 DEFAULT '1' NOT NULL,
214 privmsgs_attach_sig int2 DEFAULT '1' NOT NULL,
215 CONSTRAINT phpbb_privmsgs_pkey PRIMARY KEY (privmsgs_id)
217 CREATE INDEX privmsgs_from_userid_phpbb_privmsgs_index ON phpbb_privmsgs (privmsgs_from_userid);
218 CREATE INDEX privmsgs_to_userid_phpbb_privmsgs_index ON phpbb_privmsgs (privmsgs_to_userid);
221 /* --------------------------------------------------------
222 Table structure for table phpbb_privmsgs_text
223 -------------------------------------------------------- */
224 CREATE TABLE phpbb_privmsgs_text (
225 privmsgs_text_id int4 DEFAULT '0' NOT NULL,
226 privmsgs_bbcode_uid char(10) DEFAULT '0' NOT NULL,
228 CONSTRAINT phpbb_privmsgs_text_pkey PRIMARY KEY (privmsgs_text_id)
232 /* --------------------------------------------------------
233 Table structure for table phpbb_ranks
234 -------------------------------------------------------- */
235 CREATE TABLE phpbb_ranks (
236 rank_id int4 DEFAULT nextval('phpbb_ranks_id_seq'::text) NOT NULL,
237 rank_title varchar(50) DEFAULT '' NOT NULL,
238 rank_min int4 DEFAULT '0' NOT NULL,
239 rank_special int2 DEFAULT '0',
240 rank_image varchar(255),
241 CONSTRAINT phpbb_ranks_pkey PRIMARY KEY (rank_id)
245 /* --------------------------------------------------------
246 Table structure for table phpbb_search_results
247 -------------------------------------------------------- */
248 CREATE TABLE phpbb_search_results (
249 search_id int4 NOT NULL default '0',
250 session_id char(32) NOT NULL default '',
251 search_array text NOT NULL,
252 CONSTRAINT phpbb_search_results_pkey PRIMARY KEY (search_id)
254 CREATE INDEX session_id_phpbb_search_results_index ON phpbb_search_results (session_id);
257 /* --------------------------------------------------------
258 Table structure for table phpbb_search_wordlist
259 -------------------------------------------------------- */
260 CREATE TABLE phpbb_search_wordlist (
261 word_id int4 DEFAULT nextval('phpbb_search_wordlist_id_seq'::text) NOT NULL,
262 word_text varchar(50) NOT NULL DEFAULT '',
263 word_common int2 NOT NULL DEFAULT '0',
264 CONSTRAINT phpbb_search_wordlist_pkey PRIMARY KEY (word_text)
266 CREATE INDEX word_id_phpbb_search_wordlist_index ON phpbb_search_wordlist (word_id);
269 /* --------------------------------------------------------
270 Table structure for table phpbb_search_wordmatch
271 -------------------------------------------------------- */
272 CREATE TABLE phpbb_search_wordmatch (
273 post_id int4 NOT NULL default '0',
274 word_id int4 NOT NULL default '0',
275 title_match int2 NOT NULL default '0'
277 CREATE INDEX word_id_phpbb_search_wordmatch_index ON phpbb_search_wordmatch (word_id);
278 CREATE INDEX post_id_phpbb_search_wordmatch_index ON phpbb_search_wordmatch (post_id);
281 /* --------------------------------------------------------
282 Table structure for table phpbb_sessions
283 -------------------------------------------------------- */
284 CREATE TABLE phpbb_sessions (
285 session_id char(32) DEFAULT '0' NOT NULL,
286 session_user_id int4 DEFAULT '0' NOT NULL,
287 session_start int4 DEFAULT '0' NOT NULL,
288 session_time int4 DEFAULT '0' NOT NULL,
289 session_ip char(8) DEFAULT '0' NOT NULL,
290 session_page int4 DEFAULT '0' NOT NULL,
291 session_logged_in int2 DEFAULT '0' NOT NULL,
292 session_admin int2 DEFAULT '0' NOT NULL,
293 CONSTRAINT phpbb_session_pkey PRIMARY KEY (session_id)
295 CREATE INDEX session_user_id_phpbb_sessions_index ON phpbb_sessions (session_user_id);
296 CREATE INDEX session_id_ip_user_id_phpbb_sessions_index ON phpbb_sessions (session_id, session_ip, session_user_id);
298 /* --------------------------------------------------------
299 Table structure for table phpbb_sessions_keys
300 -------------------------------------------------------- */
301 CREATE TABLE phpbb_sessions_keys (
302 key_id char(32) DEFAULT '0' NOT NULL,
303 user_id int4 DEFAULT '0' NOT NULL,
304 last_ip char(8) DEFAULT '0' NOT NULL,
305 last_login int4 DEFAULT '0' NOT NULL,
306 CONSTRAINT phpbb_sessions_keys_pkey PRIMARY KEY (key_id, user_id)
308 CREATE INDEX last_login_phpbb_sessions_keys_index ON phpbb_sessions_keys (last_login);
310 /* --------------------------------------------------------
311 Table structure for table phpbb_smilies
312 -------------------------------------------------------- */
313 CREATE TABLE phpbb_smilies (
314 smilies_id int4 DEFAULT nextval('phpbb_smilies_id_seq'::text) NOT NULL,
316 smile_url varchar(100),
317 emoticon varchar(75),
318 CONSTRAINT phpbb_smilies_pkey PRIMARY KEY (smilies_id)
322 /* --------------------------------------------------------
323 Table structure for table phpbb_themes
324 -------------------------------------------------------- */
325 CREATE TABLE phpbb_themes (
326 themes_id int4 DEFAULT nextval('phpbb_themes_id_seq'::text) NOT NULL,
327 style_name varchar(30),
328 template_name varchar(30) NOT NULL DEFAULT '',
329 head_stylesheet varchar(100),
330 body_background varchar(100),
331 body_bgcolor char(6),
340 tr_class1 varchar(25),
341 tr_class2 varchar(25),
342 tr_class3 varchar(25),
346 th_class1 varchar(25),
347 th_class2 varchar(25),
348 th_class3 varchar(25),
352 td_class1 varchar(25),
353 td_class2 varchar(25),
354 td_class3 varchar(25),
355 fontface1 varchar(50),
356 fontface2 varchar(50),
357 fontface3 varchar(50),
364 span_class1 varchar(25),
365 span_class2 varchar(25),
366 span_class3 varchar(25),
368 img_size_privmsg int2,
369 CONSTRAINT phpbb_themes_pkey PRIMARY KEY (themes_id)
373 /* --------------------------------------------------------
374 Table structure for table phpbb_themes_name
375 -------------------------------------------------------- */
376 CREATE TABLE phpbb_themes_name (
377 themes_id int4 DEFAULT '0' NOT NULL,
378 tr_color1_name char(50),
379 tr_color2_name char(50),
380 tr_color3_name char(50),
381 tr_class1_name varchar(50),
382 tr_class2_name varchar(50),
383 tr_class3_name varchar(50),
384 th_color1_name char(50),
385 th_color2_name char(50),
386 th_color3_name char(50),
387 th_class1_name varchar(50),
388 th_class2_name varchar(50),
389 th_class3_name varchar(50),
390 td_color1_name char(50),
391 td_color2_name char(50),
392 td_color3_name char(50),
393 td_class1_name varchar(50),
394 td_class2_name varchar(50),
395 td_class3_name varchar(50),
396 fontface1_name varchar(50),
397 fontface2_name varchar(50),
398 fontface3_name varchar(50),
399 fontsize1_name varchar(50),
400 fontsize2_name varchar(50),
401 fontsize3_name varchar(50),
402 fontcolor1_name char(50),
403 fontcolor2_name char(50),
404 fontcolor3_name char(50),
405 span_class1_name varchar(50),
406 span_class2_name varchar(50),
407 span_class3_name varchar(50),
408 CONSTRAINT phpbb_themes_name_pkey PRIMARY KEY (themes_id)
412 /* --------------------------------------------------------
413 Table structure for table phpbb_topics
414 -------------------------------------------------------- */
415 CREATE TABLE phpbb_topics (
416 topic_id int4 DEFAULT nextval('phpbb_topics_id_seq'::text) NOT NULL,
417 forum_id int4 DEFAULT '0' NOT NULL,
418 topic_title varchar(60) DEFAULT '' NOT NULL,
419 topic_poster int4 DEFAULT '0' NOT NULL,
420 topic_time int4 DEFAULT '0' NOT NULL,
421 topic_views int4 DEFAULT '0' NOT NULL,
422 topic_replies int4 DEFAULT '0' NOT NULL,
423 topic_status int2 DEFAULT '0' NOT NULL,
424 topic_vote int2 DEFAULT '0' NOT NULL,
425 topic_type int2 DEFAULT '0' NOT NULL,
426 topic_first_post_id int4 DEFAULT '0' NOT NULL,
427 topic_last_post_id int4 DEFAULT '0' NOT NULL,
428 topic_moved_id int4 DEFAULT '0' NOT NULL,
429 CONSTRAINT phpbb_topics_pkey PRIMARY KEY (topic_id)
431 CREATE INDEX forum_id_phpbb_topics_index ON phpbb_topics (forum_id);
432 CREATE INDEX topic_moved_id_phpbb_topics_index ON phpbb_topics (topic_moved_id);
433 CREATE INDEX topic_first_post_id_phpbb_topics_index ON phpbb_topics (topic_first_post_id);
434 CREATE INDEX topic_last_post_id_phpbb_topics_index ON phpbb_topics (topic_last_post_id);
435 CREATE INDEX topic_status_phpbb_topics_index ON phpbb_topics (topic_status);
436 CREATE INDEX topic_type_phpbb_topics_index ON phpbb_topics (topic_type);
439 /* --------------------------------------------------------
440 Table structure for table phpbb_topics_watch
441 -------------------------------------------------------- */
442 CREATE TABLE phpbb_topics_watch (
445 notify_status int2 NOT NULL default '0'
447 CREATE INDEX topic_id_phpbb_topics_watch_index ON phpbb_topics_watch (topic_id);
448 CREATE INDEX user_id_phpbb_topics_watch_index ON phpbb_topics_watch (user_id);
451 /* --------------------------------------------------------
452 Table structure for table phpbb_user_group
453 -------------------------------------------------------- */
454 CREATE TABLE phpbb_user_group (
455 group_id int DEFAULT '0' NOT NULL,
456 user_id int DEFAULT '0' NOT NULL,
459 CREATE INDEX group_id_phpbb_user_group_index ON phpbb_user_group (group_id);
460 CREATE INDEX user_id_phpbb_user_group_index ON phpbb_user_group (user_id);
463 /* --------------------------------------------------------
464 Table structure for table phpbb_users
465 -------------------------------------------------------- */
466 CREATE TABLE phpbb_users (
467 user_id int4 DEFAULT nextval('phpbb_users_id_seq'::text) NOT NULL,
469 username varchar(25) DEFAULT '' NOT NULL,
470 user_regdate int4 DEFAULT '0' NOT NULL,
471 user_password varchar(32) DEFAULT '' NOT NULL,
472 user_session_time int4 DEFAULT '0' NOT NULL,
473 user_session_page int2 DEFAULT '0' NOT NULL,
474 user_lastvisit int4 DEFAULT '0' NOT NULL,
475 user_email varchar(255),
476 user_icq varchar(15),
477 user_website varchar(100),
478 user_occ varchar(100),
479 user_from varchar(100),
480 user_interests varchar(255),
482 user_sig_bbcode_uid char(10),
484 user_aim varchar(255),
485 user_yim varchar(255),
486 user_msnm varchar(255),
487 user_posts int4 DEFAULT '0' NOT NULL,
488 user_new_privmsg int2 DEFAULT '0' NOT NULL,
489 user_unread_privmsg int2 DEFAULT '0' NOT NULL,
490 user_last_privmsg int4 DEFAULT '0' NOT NULL,
491 user_login_tries int2 DEFAULT '0' NOT NULL,
492 user_last_login_try int4 DEFAULT '0' NOT NULL,
496 user_allowhtml int2 DEFAULT '1',
497 user_allowbbcode int2 DEFAULT '1',
498 user_allowsmile int2 DEFAULT '1',
499 user_allow_pm int2 DEFAULT '1' NOT NULL,
500 user_allowavatar int2 DEFAULT '1' NOT NULL,
501 user_allow_viewonline int2 DEFAULT '1' NOT NULL,
502 user_rank int4 DEFAULT '0',
503 user_avatar varchar(100),
504 user_avatar_type int2 DEFAULT '0' NOT NULL,
505 user_level int4 DEFAULT '0',
506 user_lang varchar(255),
507 user_timezone decimal(5) DEFAULT '0' NOT NULL,
508 user_dateformat varchar(14) DEFAULT 'd M Y H:i' NOT NULL,
509 user_notify_pm int2 DEFAULT '0' NOT NULL,
510 user_popup_pm int2 DEFAULT '0' NOT NULL,
512 user_actkey varchar(32),
513 user_newpasswd varchar(32),
514 CONSTRAINT phpbb_users_pkey PRIMARY KEY (user_id)
517 CREATE INDEX user_session_time_phpbb_users_index ON phpbb_users (user_session_time);
519 /* --------------------------------------------------------
520 Table structure for table phpbb_vote_desc
521 -------------------------------------------------------- */
522 CREATE TABLE phpbb_vote_desc (
523 vote_id int4 DEFAULT nextval('phpbb_vote_desc_id_seq'::text) NOT NULL ,
524 topic_id int4 NOT NULL DEFAULT '0',
525 vote_text text NOT NULL,
526 vote_start int4 DEFAULT '0' NOT NULL,
527 vote_length int4 DEFAULT '0' NOT NULL,
528 CONSTRAINT phpbb_vote_dsc_pkey PRIMARY KEY (vote_id)
530 CREATE INDEX topic_id_phpbb_vote_desc_index ON phpbb_vote_desc (topic_id);
532 /* --------------------------------------------------------
533 Table structure for table phpbb_vote_results
534 -------------------------------------------------------- */
535 CREATE TABLE phpbb_vote_results (
536 vote_id int4 NOT NULL DEFAULT '0',
537 vote_option_id int4 NOT NULL DEFAULT '0',
538 vote_option_text varchar(255) NOT NULL,
539 vote_result int4 NOT NULL DEFAULT '0'
541 CREATE INDEX option_id_phpbb_vote_results_index ON phpbb_vote_results (vote_option_id);
543 /* --------------------------------------------------------
544 Table structure for table phpbb_vote_voters
545 -------------------------------------------------------- */
546 CREATE TABLE phpbb_vote_voters (
547 vote_id int4 NOT NULL DEFAULT '0',
548 vote_user_id int4 NOT NULL DEFAULT '0',
549 vote_user_ip char(8) NOT NULL
551 CREATE INDEX vote_id_phpbb_vote_voters_index ON phpbb_vote_voters (vote_id);
552 CREATE INDEX vote_user_id_phpbb_vote_voters_index ON phpbb_vote_voters (vote_user_id);
553 CREATE INDEX vote_user_ip_phpbb_vote_voters_index ON phpbb_vote_voters (vote_user_ip);
555 /* --------------------------------------------------------
556 Table structure for table phpbb_words
557 -------------------------------------------------------- */
558 CREATE TABLE phpbb_words (
559 word_id int4 DEFAULT nextval('phpbb_words_id_seq'::text) NOT NULL,
560 word varchar(100) DEFAULT '' NOT NULL,
561 replacement varchar(100) DEFAULT '' NOT NULL,
562 CONSTRAINT phpbb_words_pkey PRIMARY KEY (word_id)