home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 April (DVD) / PCWorld_2008-04_DVD.iso / temadvd / phpbb / phpBB-2.0.22.exe / phpBB2 / install / schemas / postgres_schema.sql < prev   
Encoding:
Text File  |  2006-12-19  |  21.8 KB  |  565 lines

  1. /*
  2.  phpBB2 PostgreSQL DB schema - phpBB group 2001
  3.  
  4.  
  5.  $Id: postgres_schema.sql,v 1.1.2.9 2006/02/12 16:14:58 grahamje Exp $
  6. */
  7.  
  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;
  23.  
  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)
  43. );
  44.  
  45.  
  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)
  54. );
  55.  
  56.  
  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)
  68. );
  69.  
  70.  
  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,
  76.    ban_userid int4,
  77.    ban_ip char(8),
  78.    ban_email varchar(255),
  79.    CONSTRAINT phpbb_banlist_pkey PRIMARY KEY (ban_id)
  80. );
  81. CREATE  INDEX ban_userid_phpbb_banlist_index ON phpbb_banlist (ban_userid);
  82.  
  83.  
  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),
  90.    cat_order int4,
  91.    CONSTRAINT phpbb_categories_pkey PRIMARY KEY (cat_id)
  92. );
  93.  
  94.  
  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)
  102. );
  103.  
  104.  
  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)
  112. );
  113.  
  114.  
  115. /* --------------------------------------------------------
  116.   Table structure for table phpbb_forums
  117. -------------------------------------------------------- */
  118. CREATE TABLE phpbb_forums (
  119.    forum_id int4 DEFAULT '0' NOT NULL,
  120.    cat_id int4,
  121.    forum_name varchar(150),
  122.    forum_desc text,
  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,
  129.    prune_next int,
  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)
  142. );
  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);
  147.  
  148.  
  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)
  158. );
  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);
  161.  
  162.  
  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,
  178.    post_edit_time int4,
  179.    post_edit_count int2 DEFAULT '0' NOT NULL,
  180.    CONSTRAINT phpbb_posts_pkey PRIMARY KEY (post_id)
  181. );
  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);
  186.  
  187.  
  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),
  195.    post_text text,
  196.    CONSTRAINT phpbb_posts_text_pkey PRIMARY KEY (post_id)
  197. );
  198.  
  199.  
  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)
  216. );
  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);
  219.  
  220.  
  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,
  227.    privmsgs_text text,
  228.    CONSTRAINT phpbb_privmsgs_text_pkey PRIMARY KEY (privmsgs_text_id)
  229. );
  230.  
  231.  
  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)
  242. );
  243.  
  244.  
  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_time int4 DEFAULT '0' NOT NULL,
  252.   search_array text NOT NULL,
  253.   CONSTRAINT phpbb_search_results_pkey PRIMARY KEY (search_id)
  254. );
  255. CREATE  INDEX session_id_phpbb_search_results_index ON phpbb_search_results (session_id);
  256.  
  257.  
  258. /* --------------------------------------------------------
  259.   Table structure for table phpbb_search_wordlist
  260. -------------------------------------------------------- */
  261. CREATE TABLE phpbb_search_wordlist (
  262.   word_id int4 DEFAULT nextval('phpbb_search_wordlist_id_seq'::text) NOT NULL,
  263.   word_text varchar(50) NOT NULL DEFAULT '',
  264.   word_common int2 NOT NULL DEFAULT '0',
  265.   CONSTRAINT phpbb_search_wordlist_pkey PRIMARY KEY (word_text)
  266. );
  267. CREATE  INDEX word_id_phpbb_search_wordlist_index ON phpbb_search_wordlist (word_id);
  268.  
  269.  
  270. /* --------------------------------------------------------
  271.   Table structure for table phpbb_search_wordmatch
  272. -------------------------------------------------------- */
  273. CREATE TABLE phpbb_search_wordmatch (
  274.   post_id int4 NOT NULL default '0',
  275.   word_id int4 NOT NULL default '0',
  276.   title_match int2 NOT NULL default '0'
  277. );
  278. CREATE  INDEX word_id_phpbb_search_wordmatch_index ON phpbb_search_wordmatch (word_id);
  279. CREATE  INDEX post_id_phpbb_search_wordmatch_index ON phpbb_search_wordmatch (post_id);
  280.  
  281.  
  282. /* --------------------------------------------------------
  283.   Table structure for table phpbb_sessions
  284. -------------------------------------------------------- */
  285. CREATE TABLE phpbb_sessions (
  286.    session_id char(32) DEFAULT '0' NOT NULL,
  287.    session_user_id int4 DEFAULT '0' NOT NULL,
  288.    session_start int4 DEFAULT '0' NOT NULL,
  289.    session_time int4 DEFAULT '0' NOT NULL,
  290.    session_ip char(8) DEFAULT '0' NOT NULL,
  291.    session_page int4 DEFAULT '0' NOT NULL,
  292.    session_logged_in int2 DEFAULT '0' NOT NULL,
  293.    session_admin int2 DEFAULT '0' NOT NULL,
  294.    CONSTRAINT phpbb_session_pkey PRIMARY KEY (session_id)
  295. );
  296. CREATE INDEX session_user_id_phpbb_sessions_index ON phpbb_sessions (session_user_id);
  297. CREATE INDEX session_id_ip_user_id_phpbb_sessions_index ON phpbb_sessions (session_id, session_ip, session_user_id);
  298.  
  299. /* --------------------------------------------------------
  300.   Table structure for table phpbb_sessions_keys
  301. -------------------------------------------------------- */
  302. CREATE TABLE phpbb_sessions_keys (
  303.   key_id char(32) DEFAULT '0' NOT NULL,
  304.   user_id int4 DEFAULT '0' NOT NULL,
  305.   last_ip char(8) DEFAULT '0' NOT NULL,
  306.   last_login int4 DEFAULT '0' NOT NULL,
  307.   CONSTRAINT phpbb_sessions_keys_pkey PRIMARY KEY (key_id, user_id)
  308. );
  309. CREATE INDEX last_login_phpbb_sessions_keys_index ON phpbb_sessions_keys (last_login);
  310.  
  311. /* --------------------------------------------------------
  312.   Table structure for table phpbb_smilies
  313. -------------------------------------------------------- */
  314. CREATE TABLE phpbb_smilies (
  315.    smilies_id int4 DEFAULT nextval('phpbb_smilies_id_seq'::text) NOT NULL,
  316.    code varchar(50),
  317.    smile_url varchar(100),
  318.    emoticon varchar(75),
  319.    CONSTRAINT phpbb_smilies_pkey PRIMARY KEY (smilies_id)
  320. );
  321.  
  322.  
  323. /* --------------------------------------------------------
  324.   Table structure for table phpbb_themes
  325. -------------------------------------------------------- */
  326. CREATE TABLE phpbb_themes (
  327.    themes_id int4 DEFAULT nextval('phpbb_themes_id_seq'::text) NOT NULL,
  328.    style_name varchar(30),
  329.    template_name varchar(30) NOT NULL DEFAULT '',
  330.    head_stylesheet varchar(100),
  331.    body_background varchar(100),
  332.    body_bgcolor char(6),
  333.    body_text char(6),
  334.    body_link char(6),
  335.    body_vlink char(6),
  336.    body_alink char(6),
  337.    body_hlink char(6),
  338.    tr_color1 char(6),
  339.    tr_color2 char(6),
  340.    tr_color3 char(6),
  341.    tr_class1 varchar(25),
  342.    tr_class2 varchar(25),
  343.    tr_class3 varchar(25),
  344.    th_color1 char(6),
  345.    th_color2 char(6),
  346.    th_color3 char(6),
  347.    th_class1 varchar(25),
  348.    th_class2 varchar(25),
  349.    th_class3 varchar(25),
  350.    td_color1 char(6),
  351.    td_color2 char(6),
  352.    td_color3 char(6),
  353.    td_class1 varchar(25),
  354.    td_class2 varchar(25),
  355.    td_class3 varchar(25),
  356.    fontface1 varchar(50),
  357.    fontface2 varchar(50),
  358.    fontface3 varchar(50),
  359.    fontsize1 int2,
  360.    fontsize2 int2,
  361.    fontsize3 int2,
  362.    fontcolor1 char(6),
  363.    fontcolor2 char(6),
  364.    fontcolor3 char(6),
  365.    span_class1 varchar(25),
  366.    span_class2 varchar(25),
  367.    span_class3 varchar(25),
  368.    img_size_poll int2,
  369.    img_size_privmsg int2,
  370.    CONSTRAINT phpbb_themes_pkey PRIMARY KEY (themes_id)
  371. );
  372.  
  373.  
  374. /* --------------------------------------------------------
  375.   Table structure for table phpbb_themes_name
  376. -------------------------------------------------------- */
  377. CREATE TABLE phpbb_themes_name (
  378.    themes_id int4 DEFAULT '0' NOT NULL,
  379.    tr_color1_name char(50),
  380.    tr_color2_name char(50),
  381.    tr_color3_name char(50),
  382.    tr_class1_name varchar(50),
  383.    tr_class2_name varchar(50),
  384.    tr_class3_name varchar(50),
  385.    th_color1_name char(50),
  386.    th_color2_name char(50),
  387.    th_color3_name char(50),
  388.    th_class1_name varchar(50),
  389.    th_class2_name varchar(50),
  390.    th_class3_name varchar(50),
  391.    td_color1_name char(50),
  392.    td_color2_name char(50),
  393.    td_color3_name char(50),
  394.    td_class1_name varchar(50),
  395.    td_class2_name varchar(50),
  396.    td_class3_name varchar(50),
  397.    fontface1_name varchar(50),
  398.    fontface2_name varchar(50),
  399.    fontface3_name varchar(50),
  400.    fontsize1_name varchar(50),
  401.    fontsize2_name varchar(50),
  402.    fontsize3_name varchar(50),
  403.    fontcolor1_name char(50),
  404.    fontcolor2_name char(50),
  405.    fontcolor3_name char(50),
  406.    span_class1_name varchar(50),
  407.    span_class2_name varchar(50),
  408.    span_class3_name varchar(50),
  409.    CONSTRAINT phpbb_themes_name_pkey PRIMARY KEY (themes_id)
  410. );
  411.  
  412.  
  413. /* --------------------------------------------------------
  414.   Table structure for table phpbb_topics
  415. -------------------------------------------------------- */
  416. CREATE TABLE phpbb_topics (
  417.    topic_id int4 DEFAULT nextval('phpbb_topics_id_seq'::text) NOT NULL,
  418.    forum_id int4 DEFAULT '0' NOT NULL,
  419.    topic_title varchar(60) DEFAULT '' NOT NULL,
  420.    topic_poster int4 DEFAULT '0' NOT NULL,
  421.    topic_time int4 DEFAULT '0' NOT NULL,
  422.    topic_views int4 DEFAULT '0' NOT NULL,
  423.    topic_replies int4 DEFAULT '0' NOT NULL,
  424.    topic_status int2 DEFAULT '0' NOT NULL,
  425.    topic_vote int2 DEFAULT '0' NOT NULL,
  426.    topic_type int2 DEFAULT '0' NOT NULL,
  427.    topic_first_post_id int4 DEFAULT '0' NOT NULL,
  428.    topic_last_post_id int4 DEFAULT '0' NOT NULL,
  429.    topic_moved_id int4 DEFAULT '0' NOT NULL,
  430.    CONSTRAINT phpbb_topics_pkey PRIMARY KEY (topic_id)
  431. );
  432. CREATE  INDEX forum_id_phpbb_topics_index ON phpbb_topics (forum_id);
  433. CREATE  INDEX topic_moved_id_phpbb_topics_index ON phpbb_topics (topic_moved_id);
  434. CREATE  INDEX topic_first_post_id_phpbb_topics_index ON phpbb_topics (topic_first_post_id);
  435. CREATE  INDEX topic_last_post_id_phpbb_topics_index ON phpbb_topics (topic_last_post_id);
  436. CREATE  INDEX topic_status_phpbb_topics_index ON phpbb_topics (topic_status);
  437. CREATE  INDEX topic_type_phpbb_topics_index ON phpbb_topics (topic_type);
  438.  
  439.  
  440. /* --------------------------------------------------------
  441.   Table structure for table phpbb_topics_watch
  442. -------------------------------------------------------- */
  443. CREATE TABLE phpbb_topics_watch (
  444.   topic_id int4,
  445.   user_id int4,
  446.   notify_status int2 NOT NULL default '0'
  447. );
  448. CREATE  INDEX topic_id_phpbb_topics_watch_index ON phpbb_topics_watch (topic_id);
  449. CREATE  INDEX user_id_phpbb_topics_watch_index ON phpbb_topics_watch (user_id);
  450.  
  451.  
  452. /* --------------------------------------------------------
  453.   Table structure for table phpbb_user_group
  454. -------------------------------------------------------- */
  455. CREATE TABLE phpbb_user_group (
  456.    group_id int DEFAULT '0' NOT NULL,
  457.    user_id int DEFAULT '0' NOT NULL,
  458.    user_pending int2
  459. );
  460. CREATE  INDEX group_id_phpbb_user_group_index ON phpbb_user_group (group_id);
  461. CREATE  INDEX user_id_phpbb_user_group_index ON phpbb_user_group (user_id);
  462.  
  463.  
  464. /* --------------------------------------------------------
  465.   Table structure for table phpbb_users
  466. -------------------------------------------------------- */
  467. CREATE TABLE phpbb_users (
  468.    user_id int4 DEFAULT nextval('phpbb_users_id_seq'::text) NOT NULL,
  469.    user_active int2,
  470.    username varchar(25) DEFAULT '' NOT NULL,
  471.    user_regdate int4 DEFAULT '0' NOT NULL,
  472.    user_password varchar(32) DEFAULT '' NOT NULL,
  473.    user_session_time int4 DEFAULT '0' NOT NULL,
  474.    user_session_page int2 DEFAULT '0' NOT NULL,
  475.    user_lastvisit int4 DEFAULT '0' NOT NULL,
  476.    user_email varchar(255),
  477.    user_icq varchar(15),
  478.    user_website varchar(100),
  479.    user_occ varchar(100),
  480.    user_from varchar(100),
  481.    user_interests varchar(255),
  482.    user_sig text,
  483.    user_sig_bbcode_uid char(10),
  484.    user_style int4,
  485.    user_aim varchar(255),
  486.    user_yim varchar(255),
  487.    user_msnm varchar(255),
  488.    user_posts int4 DEFAULT '0' NOT NULL,
  489.    user_new_privmsg int2 DEFAULT '0' NOT NULL,
  490.    user_unread_privmsg int2 DEFAULT '0' NOT NULL,
  491.    user_last_privmsg int4 DEFAULT '0' NOT NULL,
  492.    user_login_tries int2 DEFAULT '0' NOT NULL,
  493.    user_last_login_try int4 DEFAULT '0' NOT NULL,
  494.    user_emailtime int4,
  495.    user_viewemail int2,
  496.    user_attachsig int2,
  497.    user_allowhtml int2 DEFAULT '1',
  498.    user_allowbbcode int2 DEFAULT '1',
  499.    user_allowsmile int2 DEFAULT '1',
  500.    user_allow_pm int2 DEFAULT '1' NOT NULL,
  501.    user_allowavatar int2 DEFAULT '1' NOT NULL,
  502.    user_allow_viewonline int2 DEFAULT '1' NOT NULL,
  503.    user_rank int4 DEFAULT '0',
  504.    user_avatar varchar(100),
  505.    user_avatar_type int2 DEFAULT '0' NOT NULL,
  506.    user_level int4 DEFAULT '0',
  507.    user_lang varchar(255),
  508.    user_timezone decimal(5,2) DEFAULT '0.0' NOT NULL,
  509.    user_dateformat varchar(14) DEFAULT 'd M Y H:i' NOT NULL,
  510.    user_notify_pm int2 DEFAULT '0' NOT NULL,
  511.    user_popup_pm int2 DEFAULT '0' NOT NULL,
  512.    user_notify int2,
  513.    user_actkey varchar(32),
  514.    user_newpasswd varchar(32),
  515.    CONSTRAINT phpbb_users_pkey PRIMARY KEY (user_id)
  516. );
  517.  
  518. CREATE  INDEX user_session_time_phpbb_users_index ON phpbb_users (user_session_time);
  519.  
  520. /* --------------------------------------------------------
  521.   Table structure for table phpbb_vote_desc
  522. -------------------------------------------------------- */
  523. CREATE TABLE phpbb_vote_desc (
  524.   vote_id int4 DEFAULT nextval('phpbb_vote_desc_id_seq'::text) NOT NULL ,
  525.   topic_id int4 NOT NULL DEFAULT '0',
  526.   vote_text text NOT NULL,
  527.   vote_start int4 DEFAULT '0' NOT NULL,
  528.   vote_length int4 DEFAULT '0' NOT NULL,
  529.   CONSTRAINT phpbb_vote_dsc_pkey PRIMARY KEY (vote_id)
  530. );
  531. CREATE INDEX topic_id_phpbb_vote_desc_index ON phpbb_vote_desc (topic_id);
  532.  
  533. /* --------------------------------------------------------
  534.  Table structure for table phpbb_vote_results
  535. -------------------------------------------------------- */
  536. CREATE TABLE phpbb_vote_results (
  537.   vote_id int4 NOT NULL DEFAULT '0',
  538.   vote_option_id int4 NOT NULL DEFAULT '0',
  539.   vote_option_text varchar(255) NOT NULL,
  540.   vote_result int4 NOT NULL DEFAULT '0'
  541. );
  542. CREATE INDEX option_id_phpbb_vote_results_index ON phpbb_vote_results (vote_option_id);
  543.  
  544. /* --------------------------------------------------------
  545.  Table structure for table phpbb_vote_voters
  546. -------------------------------------------------------- */
  547. CREATE TABLE phpbb_vote_voters (
  548.   vote_id int4 NOT NULL DEFAULT '0',
  549.   vote_user_id int4 NOT NULL DEFAULT '0',
  550.   vote_user_ip char(8) NOT NULL
  551. );
  552. CREATE INDEX vote_id_phpbb_vote_voters_index ON phpbb_vote_voters (vote_id);
  553. CREATE INDEX vote_user_id_phpbb_vote_voters_index ON phpbb_vote_voters (vote_user_id);
  554. CREATE INDEX vote_user_ip_phpbb_vote_voters_index ON phpbb_vote_voters (vote_user_ip);
  555.  
  556. /* --------------------------------------------------------
  557.   Table structure for table phpbb_words
  558. -------------------------------------------------------- */
  559. CREATE TABLE phpbb_words (
  560.    word_id int4 DEFAULT nextval('phpbb_words_id_seq'::text) NOT NULL,
  561.    word varchar(100) DEFAULT '' NOT NULL,
  562.    replacement varchar(100) DEFAULT '' NOT NULL,
  563.    CONSTRAINT phpbb_words_pkey PRIMARY KEY (word_id)
  564. );
  565.