?? postgres_schema.sql
字號(hào):
/*
phpBB2 PostgreSQL DB schema - phpBB group 2001
$Id: postgres_schema.sql,v 1.1.1.1 2003/02/11 22:27:33 wei.gao Exp $
*/
CREATE SEQUENCE phpbb_banlist_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE phpbb_categories_id_seq start 2 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE phpbb_disallow_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE phpbb_posts_id_seq start 2 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE phpbb_privmsgs_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE phpbb_ranks_id_seq start 2 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE phpbb_search_wordlist_id_seq start 13 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE phpbb_smilies_id_seq start 42 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE phpbb_themes_id_seq start 7 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE phpbb_topics_id_seq start 2 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE phpbb_users_id_seq start 3 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE phpbb_words_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE phpbb_groups_id_seq start 3 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE phpbb_forum_prune_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE phpbb_vote_desc_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
/* --------------------------------------------------------
Table structure for table phpbb_auth_access
-------------------------------------------------------- */
CREATE TABLE phpbb_auth_access (
group_id int DEFAULT '0' NOT NULL,
forum_id int2 DEFAULT '0' NOT NULL,
auth_view int2 DEFAULT '0' NOT NULL,
auth_read int2 DEFAULT '0' NOT NULL,
auth_post int2 DEFAULT '0' NOT NULL,
auth_reply int2 DEFAULT '0' NOT NULL,
auth_edit int2 DEFAULT '0' NOT NULL,
auth_delete int2 DEFAULT '0' NOT NULL,
auth_announce int2 DEFAULT '0' NOT NULL,
auth_sticky int2 DEFAULT '0' NOT NULL,
auth_pollcreate int2 DEFAULT '0' NOT NULL,
auth_attachments int2 DEFAULT '0' NOT NULL,
auth_vote int2 DEFAULT '0' NOT NULL,
auth_mod int2 DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_auth_access_pkey PRIMARY KEY (group_id, forum_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_groups
-------------------------------------------------------- */
CREATE TABLE phpbb_groups (
group_id int DEFAULT nextval('phpbb_groups_id_seq'::text) NOT NULL,
group_name varchar(40) NOT NULL,
group_type int2 DEFAULT '1' NOT NULL,
group_description varchar(255) NOT NULL,
group_moderator int4 DEFAULT '0' NOT NULL,
group_single_user int2 DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_groups_pkey PRIMARY KEY (group_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_banlist
-------------------------------------------------------- */
CREATE TABLE phpbb_banlist (
ban_id int4 DEFAULT nextval('phpbb_banlist_id_seq'::text) NOT NULL,
ban_userid int4,
ban_ip char(8),
ban_email varchar(255),
CONSTRAINT phpbb_banlist_pkey PRIMARY KEY (ban_id)
);
CREATE INDEX ban_userid_phpbb_banlist_index ON phpbb_banlist (ban_userid);
/* --------------------------------------------------------
Table structure for table phpbb_categories
-------------------------------------------------------- */
CREATE TABLE phpbb_categories (
cat_id int4 DEFAULT nextval('phpbb_categories_id_seq'::text) NOT NULL,
cat_title varchar(100),
cat_order int4,
CONSTRAINT phpbb_categories_pkey PRIMARY KEY (cat_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_config
-------------------------------------------------------- */
CREATE TABLE phpbb_config (
config_name varchar(255) NOT NULL,
config_value varchar(255) NOT NULL,
CONSTRAINT phpbb_config_pkey PRIMARY KEY (config_name)
);
/* --------------------------------------------------------
Table structure for table phpbb_disallow
-------------------------------------------------------- */
CREATE TABLE phpbb_disallow (
disallow_id int4 DEFAULT nextval('phpbb_disallow_id_seq'::text) NOT NULL,
disallow_username varchar(25),
CONSTRAINT phpbb_disallow_pkey PRIMARY KEY (disallow_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_forums
-------------------------------------------------------- */
CREATE TABLE phpbb_forums (
forum_id int4 DEFAULT '0' NOT NULL,
cat_id int4,
forum_name varchar(150),
forum_desc text,
forum_status int2 DEFAULT '0' NOT NULL,
forum_order int4 DEFAULT '1' NOT NULL,
forum_posts int4 DEFAULT '0' NOT NULL,
forum_topics int4 DEFAULT '0' NOT NULL,
forum_last_post_id int4 DEFAULT '0' NOT NULL,
prune_enable int2 DEFAULT '0' NOT NULL,
prune_next int,
auth_view int2 DEFAULT '0' NOT NULL,
auth_read int2 DEFAULT '0' NOT NULL,
auth_post int2 DEFAULT '0' NOT NULL,
auth_reply int2 DEFAULT '0' NOT NULL,
auth_edit int2 DEFAULT '0' NOT NULL,
auth_delete int2 DEFAULT '0' NOT NULL,
auth_announce int2 DEFAULT '0' NOT NULL,
auth_sticky int2 DEFAULT '0' NOT NULL,
auth_pollcreate int2 DEFAULT '0' NOT NULL,
auth_vote int2 DEFAULT '0' NOT NULL,
auth_attachments int2 DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_forums_pkey PRIMARY KEY (forum_id)
);
CREATE INDEX cat_id_phpbb_forums_index ON phpbb_forums (cat_id);
CREATE INDEX forum_id_phpbb_forums_index ON phpbb_forums (forum_id);
CREATE INDEX forums_order_phpbb_forums_index ON phpbb_forums (forum_order);
CREATE INDEX forum_last_post_id_phpbb_forums_index ON phpbb_forums (forum_last_post_id);
/* --------------------------------------------------------
Table structure for table phpbb_forum_prune
-------------------------------------------------------- */
CREATE TABLE phpbb_forum_prune (
prune_id int4 DEFAULT nextval('phpbb_forum_prune_id_seq'::text) NOT NULL,
forum_id int4 NOT NULL,
prune_days int4 NOT NULL,
prune_freq int4 NOT NULL,
CONSTRAINT phpbb_forum_prune_pkey PRIMARY KEY (prune_id)
);
CREATE INDEX prune_id_phpbb_forum_prune_index ON phpbb_forum_prune (prune_id);
CREATE INDEX forum_id_phpbb_forum_prune_index ON phpbb_forum_prune (forum_id);
/* --------------------------------------------------------
Table structure for table phpbb_posts
-------------------------------------------------------- */
CREATE TABLE phpbb_posts (
post_id int4 DEFAULT nextval('phpbb_posts_id_seq'::text) NOT NULL,
topic_id int4 DEFAULT '0' NOT NULL,
forum_id int4 DEFAULT '0' NOT NULL,
poster_id int4 DEFAULT '0' NOT NULL,
post_time int4 DEFAULT '0' NOT NULL,
post_username varchar(25),
poster_ip char(8) DEFAULT '' NOT NULL,
enable_bbcode int2 DEFAULT '1' NOT NULL,
enable_html int2 DEFAULT '0' NOT NULL,
enable_smilies int2 DEFAULT '1' NOT NULL,
enable_sig int2 DEFAULT '1' NOT NULL,
post_edit_time int4,
post_edit_count int2 DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_posts_pkey PRIMARY KEY (post_id)
);
CREATE INDEX forum_id_phpbb_posts_index ON phpbb_posts (forum_id);
CREATE INDEX post_time_phpbb_posts_index ON phpbb_posts (post_time);
CREATE INDEX poster_id_phpbb_posts_index ON phpbb_posts (poster_id);
CREATE INDEX topic_id_phpbb_posts_index ON phpbb_posts (topic_id);
/* --------------------------------------------------------
Table structure for table phpbb_posts_text
-------------------------------------------------------- */
CREATE TABLE phpbb_posts_text (
post_id int4 DEFAULT '0' NOT NULL,
bbcode_uid varchar(10) DEFAULT '' NOT NULL,
post_subject varchar(60),
post_text text,
CONSTRAINT phpbb_posts_text_pkey PRIMARY KEY (post_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_privmsgs
-------------------------------------------------------- */
CREATE TABLE phpbb_privmsgs (
privmsgs_id int4 DEFAULT nextval('phpbb_privmsgs_id_seq'::text) NOT NULL,
privmsgs_type int2 DEFAULT '0' NOT NULL,
privmsgs_subject varchar(255) DEFAULT '0' NOT NULL,
privmsgs_from_userid int4 DEFAULT '0' NOT NULL,
privmsgs_to_userid int4 DEFAULT '0' NOT NULL,
privmsgs_date int4 DEFAULT '0' NOT NULL,
privmsgs_ip char(8) NOT NULL,
privmsgs_enable_bbcode int2 DEFAULT '1' NOT NULL,
privmsgs_enable_html int2 DEFAULT '0' NOT NULL,
privmsgs_enable_smilies int2 DEFAULT '1' NOT NULL,
privmsgs_attach_sig int2 DEFAULT '1' NOT NULL,
CONSTRAINT phpbb_privmsgs_pkey PRIMARY KEY (privmsgs_id)
);
CREATE INDEX privmsgs_from_userid_phpbb_privmsgs_index ON phpbb_privmsgs (privmsgs_from_userid);
CREATE INDEX privmsgs_to_userid_phpbb_privmsgs_index ON phpbb_privmsgs (privmsgs_to_userid);
/* --------------------------------------------------------
Table structure for table phpbb_privmsgs_text
-------------------------------------------------------- */
CREATE TABLE phpbb_privmsgs_text (
privmsgs_text_id int4 DEFAULT '0' NOT NULL,
privmsgs_bbcode_uid char(10) DEFAULT '0' NOT NULL,
privmsgs_text text,
CONSTRAINT phpbb_privmsgs_text_pkey PRIMARY KEY (privmsgs_text_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_ranks
-------------------------------------------------------- */
CREATE TABLE phpbb_ranks (
rank_id int4 DEFAULT nextval('phpbb_ranks_id_seq'::text) NOT NULL,
rank_title varchar(50) DEFAULT '' NOT NULL,
rank_min int4 DEFAULT '0' NOT NULL,
rank_special int2 DEFAULT '0',
rank_image varchar(255),
CONSTRAINT phpbb_ranks_pkey PRIMARY KEY (rank_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_search_results
-------------------------------------------------------- */
CREATE TABLE phpbb_search_results (
search_id int4 NOT NULL default '0',
session_id char(32) NOT NULL default '',
search_array text NOT NULL,
CONSTRAINT phpbb_search_results_pkey PRIMARY KEY (search_id)
);
CREATE INDEX session_id_phpbb_search_results_index ON phpbb_search_results (session_id);
/* --------------------------------------------------------
Table structure for table phpbb_search_wordlist
-------------------------------------------------------- */
CREATE TABLE phpbb_search_wordlist (
word_id int4 DEFAULT nextval('phpbb_search_wordlist_id_seq'::text) NOT NULL,
word_text varchar(50) NOT NULL DEFAULT '',
word_common int2 NOT NULL DEFAULT '0',
CONSTRAINT phpbb_search_wordlist_pkey PRIMARY KEY (word_text)
);
CREATE INDEX word_id_phpbb_search_wordlist_index ON phpbb_search_wordlist (word_id);
/* --------------------------------------------------------
Table structure for table phpbb_search_wordmatch
-------------------------------------------------------- */
CREATE TABLE phpbb_search_wordmatch (
post_id int4 NOT NULL default '0',
word_id int4 NOT NULL default '0',
title_match int2 NOT NULL default '0'
);
CREATE INDEX word_id_phpbb_search_wordmatch_index ON phpbb_search_wordmatch (word_id);
CREATE INDEX post_id_phpbb_search_wordmatch_index ON phpbb_search_wordmatch (post_id);
/* --------------------------------------------------------
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -