Blame Extras/phpBB/3.0.4/install/schemas/oracle_schema.sql

4c79b5
/*
4c79b5
4c79b5
 $Id: oracle_schema.sql 9129 2008-11-27 13:44:24Z acydburn $
4c79b5
4c79b5
*/
4c79b5
4c79b5
/*
4c79b5
  This first section is optional, however its probably the best method
4c79b5
  of running phpBB on Oracle. If you already have a tablespace and user created
4c79b5
  for phpBB you can leave this section commented out!
4c79b5
4c79b5
  The first set of statements create a phpBB tablespace and a phpBB user,
4c79b5
  make sure you change the password of the phpBB user before you run this script!!
4c79b5
*/
4c79b5
4c79b5
/*
4c79b5
CREATE TABLESPACE "PHPBB"
4c79b5
	LOGGING
4c79b5
	DATAFILE 'E:\ORACLE\ORADATA\LOCAL\PHPBB.ora'
4c79b5
	SIZE 10M
4c79b5
	AUTOEXTEND ON NEXT 10M
4c79b5
	MAXSIZE 100M;
4c79b5
4c79b5
CREATE USER "PHPBB"
4c79b5
	PROFILE "DEFAULT"
4c79b5
	IDENTIFIED BY "phpbb_password"
4c79b5
	DEFAULT TABLESPACE "PHPBB"
4c79b5
	QUOTA UNLIMITED ON "PHPBB"
4c79b5
	ACCOUNT UNLOCK;
4c79b5
4c79b5
GRANT ANALYZE ANY TO "PHPBB";
4c79b5
GRANT CREATE SEQUENCE TO "PHPBB";
4c79b5
GRANT CREATE SESSION TO "PHPBB";
4c79b5
GRANT CREATE TABLE TO "PHPBB";
4c79b5
GRANT CREATE TRIGGER TO "PHPBB";
4c79b5
GRANT CREATE VIEW TO "PHPBB";
4c79b5
GRANT "CONNECT" TO "PHPBB";
4c79b5
4c79b5
COMMIT;
4c79b5
DISCONNECT;
4c79b5
4c79b5
CONNECT phpbb/phpbb_password;
4c79b5
*/
4c79b5
/*
4c79b5
	Table: 'phpbb_attachments'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_attachments (
4c79b5
	attach_id number(8) NOT NULL,
4c79b5
	post_msg_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	topic_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	in_message number(1) DEFAULT '0' NOT NULL,
4c79b5
	poster_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	is_orphan number(1) DEFAULT '1' NOT NULL,
4c79b5
	physical_filename varchar2(255) DEFAULT '' ,
4c79b5
	real_filename varchar2(255) DEFAULT '' ,
4c79b5
	download_count number(8) DEFAULT '0' NOT NULL,
4c79b5
	attach_comment clob DEFAULT '' ,
4c79b5
	extension varchar2(100) DEFAULT '' ,
4c79b5
	mimetype varchar2(100) DEFAULT '' ,
4c79b5
	filesize number(20) DEFAULT '0' NOT NULL,
4c79b5
	filetime number(11) DEFAULT '0' NOT NULL,
4c79b5
	thumbnail number(1) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_attachments PRIMARY KEY (attach_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime)
4c79b5
/
4c79b5
CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_attachments_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_attachments
4c79b5
BEFORE INSERT ON phpbb_attachments
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.attach_id IS NULL OR new.attach_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_attachments_seq.nextval
4c79b5
	INTO :new.attach_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_acl_groups'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_acl_groups (
4c79b5
	group_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	forum_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	auth_option_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	auth_role_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	auth_setting number(2) DEFAULT '0' NOT NULL
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_acl_options'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_acl_options (
4c79b5
	auth_option_id number(8) NOT NULL,
4c79b5
	auth_option varchar2(50) DEFAULT '' ,
4c79b5
	is_global number(1) DEFAULT '0' NOT NULL,
4c79b5
	is_local number(1) DEFAULT '0' NOT NULL,
4c79b5
	founder_only number(1) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_acl_options PRIMARY KEY (auth_option_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options (auth_option)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_acl_options_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_acl_options
4c79b5
BEFORE INSERT ON phpbb_acl_options
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.auth_option_id IS NULL OR new.auth_option_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_acl_options_seq.nextval
4c79b5
	INTO :new.auth_option_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_acl_roles'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_acl_roles (
4c79b5
	role_id number(8) NOT NULL,
4c79b5
	role_name varchar2(765) DEFAULT '' ,
4c79b5
	role_description clob DEFAULT '' ,
4c79b5
	role_type varchar2(10) DEFAULT '' ,
4c79b5
	role_order number(4) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_acl_roles PRIMARY KEY (role_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type)
4c79b5
/
4c79b5
CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_acl_roles_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_acl_roles
4c79b5
BEFORE INSERT ON phpbb_acl_roles
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.role_id IS NULL OR new.role_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_acl_roles_seq.nextval
4c79b5
	INTO :new.role_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_acl_roles_data'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_acl_roles_data (
4c79b5
	role_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	auth_option_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	auth_setting number(2) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_acl_roles_data PRIMARY KEY (role_id, auth_option_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_acl_users'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_acl_users (
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	forum_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	auth_option_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	auth_role_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	auth_setting number(2) DEFAULT '0' NOT NULL
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_banlist'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_banlist (
4c79b5
	ban_id number(8) NOT NULL,
4c79b5
	ban_userid number(8) DEFAULT '0' NOT NULL,
4c79b5
	ban_ip varchar2(40) DEFAULT '' ,
4c79b5
	ban_email varchar2(300) DEFAULT '' ,
4c79b5
	ban_start number(11) DEFAULT '0' NOT NULL,
4c79b5
	ban_end number(11) DEFAULT '0' NOT NULL,
4c79b5
	ban_exclude number(1) DEFAULT '0' NOT NULL,
4c79b5
	ban_reason varchar2(765) DEFAULT '' ,
4c79b5
	ban_give_reason varchar2(765) DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_banlist PRIMARY KEY (ban_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end)
4c79b5
/
4c79b5
CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude)
4c79b5
/
4c79b5
CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude)
4c79b5
/
4c79b5
CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_banlist_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_banlist
4c79b5
BEFORE INSERT ON phpbb_banlist
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.ban_id IS NULL OR new.ban_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_banlist_seq.nextval
4c79b5
	INTO :new.ban_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_bbcodes'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_bbcodes (
4c79b5
	bbcode_id number(3) DEFAULT '0' NOT NULL,
4c79b5
	bbcode_tag varchar2(16) DEFAULT '' ,
4c79b5
	bbcode_helpline varchar2(765) DEFAULT '' ,
4c79b5
	display_on_posting number(1) DEFAULT '0' NOT NULL,
4c79b5
	bbcode_match clob DEFAULT '' ,
4c79b5
	bbcode_tpl clob DEFAULT '' ,
4c79b5
	first_pass_match clob DEFAULT '' ,
4c79b5
	first_pass_replace clob DEFAULT '' ,
4c79b5
	second_pass_match clob DEFAULT '' ,
4c79b5
	second_pass_replace clob DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_bbcodes PRIMARY KEY (bbcode_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_bookmarks'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_bookmarks (
4c79b5
	topic_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_bookmarks PRIMARY KEY (topic_id, user_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_bots'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_bots (
4c79b5
	bot_id number(8) NOT NULL,
4c79b5
	bot_active number(1) DEFAULT '1' NOT NULL,
4c79b5
	bot_name varchar2(765) DEFAULT '' ,
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	bot_agent varchar2(255) DEFAULT '' ,
4c79b5
	bot_ip varchar2(255) DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_bots PRIMARY KEY (bot_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_bots_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_bots
4c79b5
BEFORE INSERT ON phpbb_bots
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.bot_id IS NULL OR new.bot_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_bots_seq.nextval
4c79b5
	INTO :new.bot_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_config'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_config (
4c79b5
	config_name varchar2(255) DEFAULT '' ,
4c79b5
	config_value varchar2(765) DEFAULT '' ,
4c79b5
	is_dynamic number(1) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_config PRIMARY KEY (config_name)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_confirm'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_confirm (
4c79b5
	confirm_id char(32) DEFAULT '' ,
4c79b5
	session_id char(32) DEFAULT '' ,
4c79b5
	confirm_type number(3) DEFAULT '0' NOT NULL,
4c79b5
	code varchar2(8) DEFAULT '' ,
4c79b5
	seed number(10) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_confirm PRIMARY KEY (session_id, confirm_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_disallow'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_disallow (
4c79b5
	disallow_id number(8) NOT NULL,
4c79b5
	disallow_username varchar2(765) DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_disallow PRIMARY KEY (disallow_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
CREATE SEQUENCE phpbb_disallow_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_disallow
4c79b5
BEFORE INSERT ON phpbb_disallow
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.disallow_id IS NULL OR new.disallow_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_disallow_seq.nextval
4c79b5
	INTO :new.disallow_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_drafts'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_drafts (
4c79b5
	draft_id number(8) NOT NULL,
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	topic_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	forum_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	save_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	draft_subject varchar2(765) DEFAULT '' ,
4c79b5
	draft_message clob DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_drafts PRIMARY KEY (draft_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_drafts_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_drafts
4c79b5
BEFORE INSERT ON phpbb_drafts
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.draft_id IS NULL OR new.draft_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_drafts_seq.nextval
4c79b5
	INTO :new.draft_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_extensions'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_extensions (
4c79b5
	extension_id number(8) NOT NULL,
4c79b5
	group_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	extension varchar2(100) DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_extensions PRIMARY KEY (extension_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
CREATE SEQUENCE phpbb_extensions_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_extensions
4c79b5
BEFORE INSERT ON phpbb_extensions
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.extension_id IS NULL OR new.extension_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_extensions_seq.nextval
4c79b5
	INTO :new.extension_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_extension_groups'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_extension_groups (
4c79b5
	group_id number(8) NOT NULL,
4c79b5
	group_name varchar2(765) DEFAULT '' ,
4c79b5
	cat_id number(2) DEFAULT '0' NOT NULL,
4c79b5
	allow_group number(1) DEFAULT '0' NOT NULL,
4c79b5
	download_mode number(1) DEFAULT '1' NOT NULL,
4c79b5
	upload_icon varchar2(255) DEFAULT '' ,
4c79b5
	max_filesize number(20) DEFAULT '0' NOT NULL,
4c79b5
	allowed_forums clob DEFAULT '' ,
4c79b5
	allow_in_pm number(1) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_extension_groups PRIMARY KEY (group_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
CREATE SEQUENCE phpbb_extension_groups_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_extension_groups
4c79b5
BEFORE INSERT ON phpbb_extension_groups
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.group_id IS NULL OR new.group_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_extension_groups_seq.nextval
4c79b5
	INTO :new.group_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_forums'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_forums (
4c79b5
	forum_id number(8) NOT NULL,
4c79b5
	parent_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	left_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	right_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	forum_parents clob DEFAULT '' ,
4c79b5
	forum_name varchar2(765) DEFAULT '' ,
4c79b5
	forum_desc clob DEFAULT '' ,
4c79b5
	forum_desc_bitfield varchar2(255) DEFAULT '' ,
4c79b5
	forum_desc_options number(11) DEFAULT '7' NOT NULL,
4c79b5
	forum_desc_uid varchar2(8) DEFAULT '' ,
4c79b5
	forum_link varchar2(765) DEFAULT '' ,
4c79b5
	forum_password varchar2(120) DEFAULT '' ,
4c79b5
	forum_style number(8) DEFAULT '0' NOT NULL,
4c79b5
	forum_image varchar2(255) DEFAULT '' ,
4c79b5
	forum_rules clob DEFAULT '' ,
4c79b5
	forum_rules_link varchar2(765) DEFAULT '' ,
4c79b5
	forum_rules_bitfield varchar2(255) DEFAULT '' ,
4c79b5
	forum_rules_options number(11) DEFAULT '7' NOT NULL,
4c79b5
	forum_rules_uid varchar2(8) DEFAULT '' ,
4c79b5
	forum_topics_per_page number(4) DEFAULT '0' NOT NULL,
4c79b5
	forum_type number(4) DEFAULT '0' NOT NULL,
4c79b5
	forum_status number(4) DEFAULT '0' NOT NULL,
4c79b5
	forum_posts number(8) DEFAULT '0' NOT NULL,
4c79b5
	forum_topics number(8) DEFAULT '0' NOT NULL,
4c79b5
	forum_topics_real number(8) DEFAULT '0' NOT NULL,
4c79b5
	forum_last_post_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	forum_last_poster_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	forum_last_post_subject varchar2(765) DEFAULT '' ,
4c79b5
	forum_last_post_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	forum_last_poster_name varchar2(765) DEFAULT '' ,
4c79b5
	forum_last_poster_colour varchar2(6) DEFAULT '' ,
4c79b5
	forum_flags number(4) DEFAULT '32' NOT NULL,
4c79b5
	display_subforum_list number(1) DEFAULT '1' NOT NULL,
4c79b5
	display_on_index number(1) DEFAULT '1' NOT NULL,
4c79b5
	enable_indexing number(1) DEFAULT '1' NOT NULL,
4c79b5
	enable_icons number(1) DEFAULT '1' NOT NULL,
4c79b5
	enable_prune number(1) DEFAULT '0' NOT NULL,
4c79b5
	prune_next number(11) DEFAULT '0' NOT NULL,
4c79b5
	prune_days number(8) DEFAULT '0' NOT NULL,
4c79b5
	prune_viewed number(8) DEFAULT '0' NOT NULL,
4c79b5
	prune_freq number(8) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_forums PRIMARY KEY (forum_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_forums_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_forums
4c79b5
BEFORE INSERT ON phpbb_forums
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.forum_id IS NULL OR new.forum_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_forums_seq.nextval
4c79b5
	INTO :new.forum_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_forums_access'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_forums_access (
4c79b5
	forum_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	session_id char(32) DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_forums_access PRIMARY KEY (forum_id, user_id, session_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_forums_track'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_forums_track (
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	forum_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	mark_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_forums_track PRIMARY KEY (user_id, forum_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_forums_watch'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_forums_watch (
4c79b5
	forum_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	notify_status number(1) DEFAULT '0' NOT NULL
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_groups'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_groups (
4c79b5
	group_id number(8) NOT NULL,
4c79b5
	group_type number(4) DEFAULT '1' NOT NULL,
4c79b5
	group_founder_manage number(1) DEFAULT '0' NOT NULL,
4c79b5
	group_name varchar2(255) DEFAULT '' ,
4c79b5
	group_desc clob DEFAULT '' ,
4c79b5
	group_desc_bitfield varchar2(255) DEFAULT '' ,
4c79b5
	group_desc_options number(11) DEFAULT '7' NOT NULL,
4c79b5
	group_desc_uid varchar2(8) DEFAULT '' ,
4c79b5
	group_display number(1) DEFAULT '0' NOT NULL,
4c79b5
	group_avatar varchar2(255) DEFAULT '' ,
4c79b5
	group_avatar_type number(2) DEFAULT '0' NOT NULL,
4c79b5
	group_avatar_width number(4) DEFAULT '0' NOT NULL,
4c79b5
	group_avatar_height number(4) DEFAULT '0' NOT NULL,
4c79b5
	group_rank number(8) DEFAULT '0' NOT NULL,
4c79b5
	group_colour varchar2(6) DEFAULT '' ,
4c79b5
	group_sig_chars number(8) DEFAULT '0' NOT NULL,
4c79b5
	group_receive_pm number(1) DEFAULT '0' NOT NULL,
4c79b5
	group_message_limit number(8) DEFAULT '0' NOT NULL,
4c79b5
	group_max_recipients number(8) DEFAULT '0' NOT NULL,
4c79b5
	group_legend number(1) DEFAULT '1' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_groups PRIMARY KEY (group_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_groups_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_groups
4c79b5
BEFORE INSERT ON phpbb_groups
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.group_id IS NULL OR new.group_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_groups_seq.nextval
4c79b5
	INTO :new.group_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_icons'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_icons (
4c79b5
	icons_id number(8) NOT NULL,
4c79b5
	icons_url varchar2(255) DEFAULT '' ,
4c79b5
	icons_width number(4) DEFAULT '0' NOT NULL,
4c79b5
	icons_height number(4) DEFAULT '0' NOT NULL,
4c79b5
	icons_order number(8) DEFAULT '0' NOT NULL,
4c79b5
	display_on_posting number(1) DEFAULT '1' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_icons PRIMARY KEY (icons_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_icons_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_icons
4c79b5
BEFORE INSERT ON phpbb_icons
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.icons_id IS NULL OR new.icons_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_icons_seq.nextval
4c79b5
	INTO :new.icons_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_lang'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_lang (
4c79b5
	lang_id number(4) NOT NULL,
4c79b5
	lang_iso varchar2(30) DEFAULT '' ,
4c79b5
	lang_dir varchar2(30) DEFAULT '' ,
4c79b5
	lang_english_name varchar2(300) DEFAULT '' ,
4c79b5
	lang_local_name varchar2(765) DEFAULT '' ,
4c79b5
	lang_author varchar2(765) DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_lang PRIMARY KEY (lang_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_lang_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_lang
4c79b5
BEFORE INSERT ON phpbb_lang
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.lang_id IS NULL OR new.lang_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_lang_seq.nextval
4c79b5
	INTO :new.lang_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_log'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_log (
4c79b5
	log_id number(8) NOT NULL,
4c79b5
	log_type number(4) DEFAULT '0' NOT NULL,
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	forum_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	topic_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	reportee_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	log_ip varchar2(40) DEFAULT '' ,
4c79b5
	log_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	log_operation clob DEFAULT '' ,
4c79b5
	log_data clob DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_log PRIMARY KEY (log_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type)
4c79b5
/
4c79b5
CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_log_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_log
4c79b5
BEFORE INSERT ON phpbb_log
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.log_id IS NULL OR new.log_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_log_seq.nextval
4c79b5
	INTO :new.log_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_moderator_cache'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_moderator_cache (
4c79b5
	forum_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	username varchar2(765) DEFAULT '' ,
4c79b5
	group_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	group_name varchar2(765) DEFAULT '' ,
4c79b5
	display_on_index number(1) DEFAULT '1' NOT NULL
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index)
4c79b5
/
4c79b5
CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_modules'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_modules (
4c79b5
	module_id number(8) NOT NULL,
4c79b5
	module_enabled number(1) DEFAULT '1' NOT NULL,
4c79b5
	module_display number(1) DEFAULT '1' NOT NULL,
4c79b5
	module_basename varchar2(255) DEFAULT '' ,
4c79b5
	module_class varchar2(10) DEFAULT '' ,
4c79b5
	parent_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	left_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	right_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	module_langname varchar2(255) DEFAULT '' ,
4c79b5
	module_mode varchar2(255) DEFAULT '' ,
4c79b5
	module_auth varchar2(255) DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_modules PRIMARY KEY (module_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled)
4c79b5
/
4c79b5
CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_modules_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_modules
4c79b5
BEFORE INSERT ON phpbb_modules
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.module_id IS NULL OR new.module_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_modules_seq.nextval
4c79b5
	INTO :new.module_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_poll_options'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_poll_options (
4c79b5
	poll_option_id number(4) DEFAULT '0' NOT NULL,
4c79b5
	topic_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	poll_option_text clob DEFAULT '' ,
4c79b5
	poll_option_total number(8) DEFAULT '0' NOT NULL
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_poll_votes'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_poll_votes (
4c79b5
	topic_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	poll_option_id number(4) DEFAULT '0' NOT NULL,
4c79b5
	vote_user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	vote_user_ip varchar2(40) DEFAULT '' 
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_posts'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_posts (
4c79b5
	post_id number(8) NOT NULL,
4c79b5
	topic_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	forum_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	poster_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	icon_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	poster_ip varchar2(40) DEFAULT '' ,
4c79b5
	post_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	post_approved number(1) DEFAULT '1' NOT NULL,
4c79b5
	post_reported number(1) DEFAULT '0' NOT NULL,
4c79b5
	enable_bbcode number(1) DEFAULT '1' NOT NULL,
4c79b5
	enable_smilies number(1) DEFAULT '1' NOT NULL,
4c79b5
	enable_magic_url number(1) DEFAULT '1' NOT NULL,
4c79b5
	enable_sig number(1) DEFAULT '1' NOT NULL,
4c79b5
	post_username varchar2(765) DEFAULT '' ,
4c79b5
	post_subject varchar2(765) DEFAULT '' ,
4c79b5
	post_text clob DEFAULT '' ,
4c79b5
	post_checksum varchar2(32) DEFAULT '' ,
4c79b5
	post_attachment number(1) DEFAULT '0' NOT NULL,
4c79b5
	bbcode_bitfield varchar2(255) DEFAULT '' ,
4c79b5
	bbcode_uid varchar2(8) DEFAULT '' ,
4c79b5
	post_postcount number(1) DEFAULT '1' NOT NULL,
4c79b5
	post_edit_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	post_edit_reason varchar2(765) DEFAULT '' ,
4c79b5
	post_edit_user number(8) DEFAULT '0' NOT NULL,
4c79b5
	post_edit_count number(4) DEFAULT '0' NOT NULL,
4c79b5
	post_edit_locked number(1) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_posts PRIMARY KEY (post_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip)
4c79b5
/
4c79b5
CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved)
4c79b5
/
4c79b5
CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_posts_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_posts
4c79b5
BEFORE INSERT ON phpbb_posts
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.post_id IS NULL OR new.post_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_posts_seq.nextval
4c79b5
	INTO :new.post_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_privmsgs'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_privmsgs (
4c79b5
	msg_id number(8) NOT NULL,
4c79b5
	root_level number(8) DEFAULT '0' NOT NULL,
4c79b5
	author_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	icon_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	author_ip varchar2(40) DEFAULT '' ,
4c79b5
	message_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	enable_bbcode number(1) DEFAULT '1' NOT NULL,
4c79b5
	enable_smilies number(1) DEFAULT '1' NOT NULL,
4c79b5
	enable_magic_url number(1) DEFAULT '1' NOT NULL,
4c79b5
	enable_sig number(1) DEFAULT '1' NOT NULL,
4c79b5
	message_subject varchar2(765) DEFAULT '' ,
4c79b5
	message_text clob DEFAULT '' ,
4c79b5
	message_edit_reason varchar2(765) DEFAULT '' ,
4c79b5
	message_edit_user number(8) DEFAULT '0' NOT NULL,
4c79b5
	message_attachment number(1) DEFAULT '0' NOT NULL,
4c79b5
	bbcode_bitfield varchar2(255) DEFAULT '' ,
4c79b5
	bbcode_uid varchar2(8) DEFAULT '' ,
4c79b5
	message_edit_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	message_edit_count number(4) DEFAULT '0' NOT NULL,
4c79b5
	to_address clob DEFAULT '' ,
4c79b5
	bcc_address clob DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_privmsgs PRIMARY KEY (msg_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip)
4c79b5
/
4c79b5
CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time)
4c79b5
/
4c79b5
CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_privmsgs_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_privmsgs
4c79b5
BEFORE INSERT ON phpbb_privmsgs
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.msg_id IS NULL OR new.msg_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_privmsgs_seq.nextval
4c79b5
	INTO :new.msg_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_privmsgs_folder'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_privmsgs_folder (
4c79b5
	folder_id number(8) NOT NULL,
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	folder_name varchar2(765) DEFAULT '' ,
4c79b5
	pm_count number(8) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_privmsgs_folder PRIMARY KEY (folder_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_privmsgs_folder_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_privmsgs_folder
4c79b5
BEFORE INSERT ON phpbb_privmsgs_folder
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.folder_id IS NULL OR new.folder_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_privmsgs_folder_seq.nextval
4c79b5
	INTO :new.folder_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_privmsgs_rules'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_privmsgs_rules (
4c79b5
	rule_id number(8) NOT NULL,
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	rule_check number(8) DEFAULT '0' NOT NULL,
4c79b5
	rule_connection number(8) DEFAULT '0' NOT NULL,
4c79b5
	rule_string varchar2(765) DEFAULT '' ,
4c79b5
	rule_user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	rule_group_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	rule_action number(8) DEFAULT '0' NOT NULL,
4c79b5
	rule_folder_id number(11) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_privmsgs_rules PRIMARY KEY (rule_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_privmsgs_rules_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_privmsgs_rules
4c79b5
BEFORE INSERT ON phpbb_privmsgs_rules
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.rule_id IS NULL OR new.rule_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_privmsgs_rules_seq.nextval
4c79b5
	INTO :new.rule_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_privmsgs_to'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_privmsgs_to (
4c79b5
	msg_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	author_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	pm_deleted number(1) DEFAULT '0' NOT NULL,
4c79b5
	pm_new number(1) DEFAULT '1' NOT NULL,
4c79b5
	pm_unread number(1) DEFAULT '1' NOT NULL,
4c79b5
	pm_replied number(1) DEFAULT '0' NOT NULL,
4c79b5
	pm_marked number(1) DEFAULT '0' NOT NULL,
4c79b5
	pm_forwarded number(1) DEFAULT '0' NOT NULL,
4c79b5
	folder_id number(11) DEFAULT '0' NOT NULL
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_profile_fields'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_profile_fields (
4c79b5
	field_id number(8) NOT NULL,
4c79b5
	field_name varchar2(765) DEFAULT '' ,
4c79b5
	field_type number(4) DEFAULT '0' NOT NULL,
4c79b5
	field_ident varchar2(20) DEFAULT '' ,
4c79b5
	field_length varchar2(20) DEFAULT '' ,
4c79b5
	field_minlen varchar2(255) DEFAULT '' ,
4c79b5
	field_maxlen varchar2(255) DEFAULT '' ,
4c79b5
	field_novalue varchar2(765) DEFAULT '' ,
4c79b5
	field_default_value varchar2(765) DEFAULT '' ,
4c79b5
	field_validation varchar2(60) DEFAULT '' ,
4c79b5
	field_required number(1) DEFAULT '0' NOT NULL,
4c79b5
	field_show_on_reg number(1) DEFAULT '0' NOT NULL,
4c79b5
	field_show_profile number(1) DEFAULT '0' NOT NULL,
4c79b5
	field_hide number(1) DEFAULT '0' NOT NULL,
4c79b5
	field_no_view number(1) DEFAULT '0' NOT NULL,
4c79b5
	field_active number(1) DEFAULT '0' NOT NULL,
4c79b5
	field_order number(8) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_profile_fields PRIMARY KEY (field_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type)
4c79b5
/
4c79b5
CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_profile_fields_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_profile_fields
4c79b5
BEFORE INSERT ON phpbb_profile_fields
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.field_id IS NULL OR new.field_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_profile_fields_seq.nextval
4c79b5
	INTO :new.field_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_profile_fields_data'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_profile_fields_data (
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_profile_fields_data PRIMARY KEY (user_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_profile_fields_lang'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_profile_fields_lang (
4c79b5
	field_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	lang_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	option_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	field_type number(4) DEFAULT '0' NOT NULL,
4c79b5
	lang_value varchar2(765) DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_profile_fields_lang PRIMARY KEY (field_id, lang_id, option_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_profile_lang'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_profile_lang (
4c79b5
	field_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	lang_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	lang_name varchar2(765) DEFAULT '' ,
4c79b5
	lang_explain clob DEFAULT '' ,
4c79b5
	lang_default_value varchar2(765) DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_profile_lang PRIMARY KEY (field_id, lang_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_ranks'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_ranks (
4c79b5
	rank_id number(8) NOT NULL,
4c79b5
	rank_title varchar2(765) DEFAULT '' ,
4c79b5
	rank_min number(8) DEFAULT '0' NOT NULL,
4c79b5
	rank_special number(1) DEFAULT '0' NOT NULL,
4c79b5
	rank_image varchar2(255) DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_ranks PRIMARY KEY (rank_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
CREATE SEQUENCE phpbb_ranks_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_ranks
4c79b5
BEFORE INSERT ON phpbb_ranks
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.rank_id IS NULL OR new.rank_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_ranks_seq.nextval
4c79b5
	INTO :new.rank_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_reports'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_reports (
4c79b5
	report_id number(8) NOT NULL,
4c79b5
	reason_id number(4) DEFAULT '0' NOT NULL,
4c79b5
	post_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	user_notify number(1) DEFAULT '0' NOT NULL,
4c79b5
	report_closed number(1) DEFAULT '0' NOT NULL,
4c79b5
	report_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	report_text clob DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
CREATE SEQUENCE phpbb_reports_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_reports
4c79b5
BEFORE INSERT ON phpbb_reports
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.report_id IS NULL OR new.report_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_reports_seq.nextval
4c79b5
	INTO :new.report_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_reports_reasons'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_reports_reasons (
4c79b5
	reason_id number(4) NOT NULL,
4c79b5
	reason_title varchar2(765) DEFAULT '' ,
4c79b5
	reason_description clob DEFAULT '' ,
4c79b5
	reason_order number(4) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_reports_reasons PRIMARY KEY (reason_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
CREATE SEQUENCE phpbb_reports_reasons_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_reports_reasons
4c79b5
BEFORE INSERT ON phpbb_reports_reasons
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.reason_id IS NULL OR new.reason_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_reports_reasons_seq.nextval
4c79b5
	INTO :new.reason_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_search_results'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_search_results (
4c79b5
	search_key varchar2(32) DEFAULT '' ,
4c79b5
	search_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	search_keywords clob DEFAULT '' ,
4c79b5
	search_authors clob DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_search_results PRIMARY KEY (search_key)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_search_wordlist'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_search_wordlist (
4c79b5
	word_id number(8) NOT NULL,
4c79b5
	word_text varchar2(765) DEFAULT '' ,
4c79b5
	word_common number(1) DEFAULT '0' NOT NULL,
4c79b5
	word_count number(8) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_search_wordlist PRIMARY KEY (word_id),
4c79b5
	CONSTRAINT u_phpbb_wrd_txt UNIQUE (word_text)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_search_wordlist_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_search_wordlist
4c79b5
BEFORE INSERT ON phpbb_search_wordlist
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.word_id IS NULL OR new.word_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_search_wordlist_seq.nextval
4c79b5
	INTO :new.word_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_search_wordmatch'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_search_wordmatch (
4c79b5
	post_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	word_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	title_match number(1) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT u_phpbb_unq_mtch UNIQUE (word_id, post_id, title_match)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_sessions'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_sessions (
4c79b5
	session_id char(32) DEFAULT '' ,
4c79b5
	session_user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	session_forum_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	session_last_visit number(11) DEFAULT '0' NOT NULL,
4c79b5
	session_start number(11) DEFAULT '0' NOT NULL,
4c79b5
	session_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	session_ip varchar2(40) DEFAULT '' ,
4c79b5
	session_browser varchar2(150) DEFAULT '' ,
4c79b5
	session_forwarded_for varchar2(255) DEFAULT '' ,
4c79b5
	session_page varchar2(765) DEFAULT '' ,
4c79b5
	session_viewonline number(1) DEFAULT '1' NOT NULL,
4c79b5
	session_autologin number(1) DEFAULT '0' NOT NULL,
4c79b5
	session_admin number(1) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_sessions PRIMARY KEY (session_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time)
4c79b5
/
4c79b5
CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_sessions_keys'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_sessions_keys (
4c79b5
	key_id char(32) DEFAULT '' ,
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	last_ip varchar2(40) DEFAULT '' ,
4c79b5
	last_login number(11) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_sessions_keys PRIMARY KEY (key_id, user_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_sitelist'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_sitelist (
4c79b5
	site_id number(8) NOT NULL,
4c79b5
	site_ip varchar2(40) DEFAULT '' ,
4c79b5
	site_hostname varchar2(255) DEFAULT '' ,
4c79b5
	ip_exclude number(1) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_sitelist PRIMARY KEY (site_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
CREATE SEQUENCE phpbb_sitelist_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_sitelist
4c79b5
BEFORE INSERT ON phpbb_sitelist
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.site_id IS NULL OR new.site_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_sitelist_seq.nextval
4c79b5
	INTO :new.site_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_smilies'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_smilies (
4c79b5
	smiley_id number(8) NOT NULL,
4c79b5
	code varchar2(150) DEFAULT '' ,
4c79b5
	emotion varchar2(150) DEFAULT '' ,
4c79b5
	smiley_url varchar2(50) DEFAULT '' ,
4c79b5
	smiley_width number(4) DEFAULT '0' NOT NULL,
4c79b5
	smiley_height number(4) DEFAULT '0' NOT NULL,
4c79b5
	smiley_order number(8) DEFAULT '0' NOT NULL,
4c79b5
	display_on_posting number(1) DEFAULT '1' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_smilies PRIMARY KEY (smiley_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_smilies_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_smilies
4c79b5
BEFORE INSERT ON phpbb_smilies
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.smiley_id IS NULL OR new.smiley_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_smilies_seq.nextval
4c79b5
	INTO :new.smiley_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_styles'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_styles (
4c79b5
	style_id number(8) NOT NULL,
4c79b5
	style_name varchar2(765) DEFAULT '' ,
4c79b5
	style_copyright varchar2(765) DEFAULT '' ,
4c79b5
	style_active number(1) DEFAULT '1' NOT NULL,
4c79b5
	template_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	theme_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	imageset_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_styles PRIMARY KEY (style_id),
4c79b5
	CONSTRAINT u_phpbb_style_name UNIQUE (style_name)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles (imageset_id)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_styles_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_styles
4c79b5
BEFORE INSERT ON phpbb_styles
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.style_id IS NULL OR new.style_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_styles_seq.nextval
4c79b5
	INTO :new.style_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_styles_template'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_styles_template (
4c79b5
	template_id number(8) NOT NULL,
4c79b5
	template_name varchar2(765) DEFAULT '' ,
4c79b5
	template_copyright varchar2(765) DEFAULT '' ,
4c79b5
	template_path varchar2(100) DEFAULT '' ,
4c79b5
	bbcode_bitfield varchar2(255) DEFAULT 'kNg=' NOT NULL,
4c79b5
	template_storedb number(1) DEFAULT '0' NOT NULL,
4c79b5
	template_inherits_id number(4) DEFAULT '0' NOT NULL,
4c79b5
	template_inherit_path varchar2(255) DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_styles_template PRIMARY KEY (template_id),
4c79b5
	CONSTRAINT u_phpbb_tmplte_nm UNIQUE (template_name)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
CREATE SEQUENCE phpbb_styles_template_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_styles_template
4c79b5
BEFORE INSERT ON phpbb_styles_template
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.template_id IS NULL OR new.template_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_styles_template_seq.nextval
4c79b5
	INTO :new.template_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_styles_template_data'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_styles_template_data (
4c79b5
	template_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	template_filename varchar2(100) DEFAULT '' ,
4c79b5
	template_included clob DEFAULT '' ,
4c79b5
	template_mtime number(11) DEFAULT '0' NOT NULL,
4c79b5
	template_data clob DEFAULT '' 
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_styles_theme'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_styles_theme (
4c79b5
	theme_id number(8) NOT NULL,
4c79b5
	theme_name varchar2(765) DEFAULT '' ,
4c79b5
	theme_copyright varchar2(765) DEFAULT '' ,
4c79b5
	theme_path varchar2(100) DEFAULT '' ,
4c79b5
	theme_storedb number(1) DEFAULT '0' NOT NULL,
4c79b5
	theme_mtime number(11) DEFAULT '0' NOT NULL,
4c79b5
	theme_data clob DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_styles_theme PRIMARY KEY (theme_id),
4c79b5
	CONSTRAINT u_phpbb_theme_name UNIQUE (theme_name)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
CREATE SEQUENCE phpbb_styles_theme_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_styles_theme
4c79b5
BEFORE INSERT ON phpbb_styles_theme
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.theme_id IS NULL OR new.theme_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_styles_theme_seq.nextval
4c79b5
	INTO :new.theme_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_styles_imageset'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_styles_imageset (
4c79b5
	imageset_id number(8) NOT NULL,
4c79b5
	imageset_name varchar2(765) DEFAULT '' ,
4c79b5
	imageset_copyright varchar2(765) DEFAULT '' ,
4c79b5
	imageset_path varchar2(100) DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_styles_imageset PRIMARY KEY (imageset_id),
4c79b5
	CONSTRAINT u_phpbb_imgset_nm UNIQUE (imageset_name)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
CREATE SEQUENCE phpbb_styles_imageset_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_styles_imageset
4c79b5
BEFORE INSERT ON phpbb_styles_imageset
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.imageset_id IS NULL OR new.imageset_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_styles_imageset_seq.nextval
4c79b5
	INTO :new.imageset_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_styles_imageset_data'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_styles_imageset_data (
4c79b5
	image_id number(8) NOT NULL,
4c79b5
	image_name varchar2(200) DEFAULT '' ,
4c79b5
	image_filename varchar2(200) DEFAULT '' ,
4c79b5
	image_lang varchar2(30) DEFAULT '' ,
4c79b5
	image_height number(4) DEFAULT '0' NOT NULL,
4c79b5
	image_width number(4) DEFAULT '0' NOT NULL,
4c79b5
	imageset_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_styles_imageset_data PRIMARY KEY (image_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_styles_imageset_data_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_styles_imageset_data
4c79b5
BEFORE INSERT ON phpbb_styles_imageset_data
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.image_id IS NULL OR new.image_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_styles_imageset_data_seq.nextval
4c79b5
	INTO :new.image_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_topics'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_topics (
4c79b5
	topic_id number(8) NOT NULL,
4c79b5
	forum_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	icon_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	topic_attachment number(1) DEFAULT '0' NOT NULL,
4c79b5
	topic_approved number(1) DEFAULT '1' NOT NULL,
4c79b5
	topic_reported number(1) DEFAULT '0' NOT NULL,
4c79b5
	topic_title varchar2(765) DEFAULT '' ,
4c79b5
	topic_poster number(8) DEFAULT '0' NOT NULL,
4c79b5
	topic_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	topic_time_limit number(11) DEFAULT '0' NOT NULL,
4c79b5
	topic_views number(8) DEFAULT '0' NOT NULL,
4c79b5
	topic_replies number(8) DEFAULT '0' NOT NULL,
4c79b5
	topic_replies_real number(8) DEFAULT '0' NOT NULL,
4c79b5
	topic_status number(3) DEFAULT '0' NOT NULL,
4c79b5
	topic_type number(3) DEFAULT '0' NOT NULL,
4c79b5
	topic_first_post_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	topic_first_poster_name varchar2(765) DEFAULT '' ,
4c79b5
	topic_first_poster_colour varchar2(6) DEFAULT '' ,
4c79b5
	topic_last_post_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	topic_last_poster_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	topic_last_poster_name varchar2(765) DEFAULT '' ,
4c79b5
	topic_last_poster_colour varchar2(6) DEFAULT '' ,
4c79b5
	topic_last_post_subject varchar2(765) DEFAULT '' ,
4c79b5
	topic_last_post_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	topic_last_view_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	topic_moved_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	topic_bumped number(1) DEFAULT '0' NOT NULL,
4c79b5
	topic_bumper number(8) DEFAULT '0' NOT NULL,
4c79b5
	poll_title varchar2(765) DEFAULT '' ,
4c79b5
	poll_start number(11) DEFAULT '0' NOT NULL,
4c79b5
	poll_length number(11) DEFAULT '0' NOT NULL,
4c79b5
	poll_max_options number(4) DEFAULT '1' NOT NULL,
4c79b5
	poll_last_vote number(11) DEFAULT '0' NOT NULL,
4c79b5
	poll_vote_change number(1) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_topics PRIMARY KEY (topic_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type)
4c79b5
/
4c79b5
CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time)
4c79b5
/
4c79b5
CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved)
4c79b5
/
4c79b5
CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_topics_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_topics
4c79b5
BEFORE INSERT ON phpbb_topics
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.topic_id IS NULL OR new.topic_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_topics_seq.nextval
4c79b5
	INTO :new.topic_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_topics_track'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_topics_track (
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	topic_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	forum_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	mark_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_topics_track PRIMARY KEY (user_id, topic_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_topics_posted'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_topics_posted (
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	topic_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	topic_posted number(1) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_topics_posted PRIMARY KEY (user_id, topic_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_topics_watch'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_topics_watch (
4c79b5
	topic_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	notify_status number(1) DEFAULT '0' NOT NULL
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_user_group'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_user_group (
4c79b5
	group_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	group_leader number(1) DEFAULT '0' NOT NULL,
4c79b5
	user_pending number(1) DEFAULT '1' NOT NULL
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id)
4c79b5
/
4c79b5
CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader)
4c79b5
/
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_users'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_users (
4c79b5
	user_id number(8) NOT NULL,
4c79b5
	user_type number(2) DEFAULT '0' NOT NULL,
4c79b5
	group_id number(8) DEFAULT '3' NOT NULL,
4c79b5
	user_permissions clob DEFAULT '' ,
4c79b5
	user_perm_from number(8) DEFAULT '0' NOT NULL,
4c79b5
	user_ip varchar2(40) DEFAULT '' ,
4c79b5
	user_regdate number(11) DEFAULT '0' NOT NULL,
4c79b5
	username varchar2(255) DEFAULT '' ,
4c79b5
	username_clean varchar2(255) DEFAULT '' ,
4c79b5
	user_password varchar2(120) DEFAULT '' ,
4c79b5
	user_passchg number(11) DEFAULT '0' NOT NULL,
4c79b5
	user_pass_convert number(1) DEFAULT '0' NOT NULL,
4c79b5
	user_email varchar2(300) DEFAULT '' ,
4c79b5
	user_email_hash number(20) DEFAULT '0' NOT NULL,
4c79b5
	user_birthday varchar2(10) DEFAULT '' ,
4c79b5
	user_lastvisit number(11) DEFAULT '0' NOT NULL,
4c79b5
	user_lastmark number(11) DEFAULT '0' NOT NULL,
4c79b5
	user_lastpost_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	user_lastpage varchar2(600) DEFAULT '' ,
4c79b5
	user_last_confirm_key varchar2(10) DEFAULT '' ,
4c79b5
	user_last_search number(11) DEFAULT '0' NOT NULL,
4c79b5
	user_warnings number(4) DEFAULT '0' NOT NULL,
4c79b5
	user_last_warning number(11) DEFAULT '0' NOT NULL,
4c79b5
	user_login_attempts number(4) DEFAULT '0' NOT NULL,
4c79b5
	user_inactive_reason number(2) DEFAULT '0' NOT NULL,
4c79b5
	user_inactive_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	user_posts number(8) DEFAULT '0' NOT NULL,
4c79b5
	user_lang varchar2(30) DEFAULT '' ,
4c79b5
	user_timezone number(5, 2) DEFAULT '0' NOT NULL,
4c79b5
	user_dst number(1) DEFAULT '0' NOT NULL,
4c79b5
	user_dateformat varchar2(90) DEFAULT 'd M Y H:i' NOT NULL,
4c79b5
	user_style number(8) DEFAULT '0' NOT NULL,
4c79b5
	user_rank number(8) DEFAULT '0' NOT NULL,
4c79b5
	user_colour varchar2(6) DEFAULT '' ,
4c79b5
	user_new_privmsg number(4) DEFAULT '0' NOT NULL,
4c79b5
	user_unread_privmsg number(4) DEFAULT '0' NOT NULL,
4c79b5
	user_last_privmsg number(11) DEFAULT '0' NOT NULL,
4c79b5
	user_message_rules number(1) DEFAULT '0' NOT NULL,
4c79b5
	user_full_folder number(11) DEFAULT '-3' NOT NULL,
4c79b5
	user_emailtime number(11) DEFAULT '0' NOT NULL,
4c79b5
	user_topic_show_days number(4) DEFAULT '0' NOT NULL,
4c79b5
	user_topic_sortby_type varchar2(1) DEFAULT 't' NOT NULL,
4c79b5
	user_topic_sortby_dir varchar2(1) DEFAULT 'd' NOT NULL,
4c79b5
	user_post_show_days number(4) DEFAULT '0' NOT NULL,
4c79b5
	user_post_sortby_type varchar2(1) DEFAULT 't' NOT NULL,
4c79b5
	user_post_sortby_dir varchar2(1) DEFAULT 'a' NOT NULL,
4c79b5
	user_notify number(1) DEFAULT '0' NOT NULL,
4c79b5
	user_notify_pm number(1) DEFAULT '1' NOT NULL,
4c79b5
	user_notify_type number(4) DEFAULT '0' NOT NULL,
4c79b5
	user_allow_pm number(1) DEFAULT '1' NOT NULL,
4c79b5
	user_allow_viewonline number(1) DEFAULT '1' NOT NULL,
4c79b5
	user_allow_viewemail number(1) DEFAULT '1' NOT NULL,
4c79b5
	user_allow_massemail number(1) DEFAULT '1' NOT NULL,
4c79b5
	user_options number(11) DEFAULT '895' NOT NULL,
4c79b5
	user_avatar varchar2(255) DEFAULT '' ,
4c79b5
	user_avatar_type number(2) DEFAULT '0' NOT NULL,
4c79b5
	user_avatar_width number(4) DEFAULT '0' NOT NULL,
4c79b5
	user_avatar_height number(4) DEFAULT '0' NOT NULL,
4c79b5
	user_sig clob DEFAULT '' ,
4c79b5
	user_sig_bbcode_uid varchar2(8) DEFAULT '' ,
4c79b5
	user_sig_bbcode_bitfield varchar2(255) DEFAULT '' ,
4c79b5
	user_from varchar2(300) DEFAULT '' ,
4c79b5
	user_icq varchar2(15) DEFAULT '' ,
4c79b5
	user_aim varchar2(765) DEFAULT '' ,
4c79b5
	user_yim varchar2(765) DEFAULT '' ,
4c79b5
	user_msnm varchar2(765) DEFAULT '' ,
4c79b5
	user_jabber varchar2(765) DEFAULT '' ,
4c79b5
	user_website varchar2(600) DEFAULT '' ,
4c79b5
	user_occ clob DEFAULT '' ,
4c79b5
	user_interests clob DEFAULT '' ,
4c79b5
	user_actkey varchar2(32) DEFAULT '' ,
4c79b5
	user_newpasswd varchar2(120) DEFAULT '' ,
4c79b5
	user_form_salt varchar2(96) DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_users PRIMARY KEY (user_id),
4c79b5
	CONSTRAINT u_phpbb_username_clean UNIQUE (username_clean)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday)
4c79b5
/
4c79b5
CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash)
4c79b5
/
4c79b5
CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type)
4c79b5
/
4c79b5
4c79b5
CREATE SEQUENCE phpbb_users_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_users
4c79b5
BEFORE INSERT ON phpbb_users
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.user_id IS NULL OR new.user_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_users_seq.nextval
4c79b5
	INTO :new.user_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_warnings'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_warnings (
4c79b5
	warning_id number(8) NOT NULL,
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	post_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	log_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	warning_time number(11) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_warnings PRIMARY KEY (warning_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
CREATE SEQUENCE phpbb_warnings_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_warnings
4c79b5
BEFORE INSERT ON phpbb_warnings
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.warning_id IS NULL OR new.warning_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_warnings_seq.nextval
4c79b5
	INTO :new.warning_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_words'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_words (
4c79b5
	word_id number(8) NOT NULL,
4c79b5
	word varchar2(765) DEFAULT '' ,
4c79b5
	replacement varchar2(765) DEFAULT '' ,
4c79b5
	CONSTRAINT pk_phpbb_words PRIMARY KEY (word_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5
4c79b5
CREATE SEQUENCE phpbb_words_seq
4c79b5
/
4c79b5
4c79b5
CREATE OR REPLACE TRIGGER t_phpbb_words
4c79b5
BEFORE INSERT ON phpbb_words
4c79b5
FOR EACH ROW WHEN (
4c79b5
	new.word_id IS NULL OR new.word_id = 0
4c79b5
)
4c79b5
BEGIN
4c79b5
	SELECT phpbb_words_seq.nextval
4c79b5
	INTO :new.word_id
4c79b5
	FROM dual;
4c79b5
END;
4c79b5
/
4c79b5
4c79b5
4c79b5
/*
4c79b5
	Table: 'phpbb_zebra'
4c79b5
*/
4c79b5
CREATE TABLE phpbb_zebra (
4c79b5
	user_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	zebra_id number(8) DEFAULT '0' NOT NULL,
4c79b5
	friend number(1) DEFAULT '0' NOT NULL,
4c79b5
	foe number(1) DEFAULT '0' NOT NULL,
4c79b5
	CONSTRAINT pk_phpbb_zebra PRIMARY KEY (user_id, zebra_id)
4c79b5
)
4c79b5
/
4c79b5
4c79b5