diff options
-rw-r--r-- | phpBB/develop/create_schema_files.php | 11 | ||||
-rw-r--r-- | phpBB/includes/constants.php | 1 | ||||
-rw-r--r-- | phpBB/install/schemas/firebird_schema.sql | 27 | ||||
-rw-r--r-- | phpBB/install/schemas/mssql_schema.sql | 24 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_40_schema.sql | 13 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_41_schema.sql | 13 | ||||
-rw-r--r-- | phpBB/install/schemas/oracle_schema.sql | 32 | ||||
-rw-r--r-- | phpBB/install/schemas/postgres_schema.sql | 17 | ||||
-rw-r--r-- | phpBB/install/schemas/sqlite_schema.sql | 14 |
9 files changed, 142 insertions, 10 deletions
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php index 3d3e478032..366f4a9d48 100644 --- a/phpBB/develop/create_schema_files.php +++ b/phpBB/develop/create_schema_files.php @@ -1669,6 +1669,17 @@ function get_schema_struct() ), ); + $schema_data['phpbb_teampage'] = array( + 'COLUMNS' => array( + 'teampage_id' => array('UINT', NULL, 'auto_increment'), + 'group_id' => array('UINT', 0), + 'teampage_name' => array('VCHAR_UNI:255', ''), + 'teampage_position' => array('UINT', 0), + 'teampage_parent' => array('UINT', 0), + ), + 'PRIMARY_KEY' => 'teampage_id', + ); + $schema_data['phpbb_topics'] = array( 'COLUMNS' => array( 'topic_id' => array('UINT', NULL, 'auto_increment'), diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index 68af41ab20..640616a49d 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -267,6 +267,7 @@ define('STYLES_TEMPLATE_DATA_TABLE',$table_prefix . 'styles_template_data'); define('STYLES_THEME_TABLE', $table_prefix . 'styles_theme'); define('STYLES_IMAGESET_TABLE', $table_prefix . 'styles_imageset'); define('STYLES_IMAGESET_DATA_TABLE',$table_prefix . 'styles_imageset_data'); +define('TEAMPAGE_TABLE', $table_prefix . 'teampage'); define('TOPICS_TABLE', $table_prefix . 'topics'); define('TOPICS_POSTED_TABLE', $table_prefix . 'topics_posted'); define('TOPICS_TRACK_TABLE', $table_prefix . 'topics_track'); diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 767ce68b4a..b25d0216d9 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -912,8 +912,8 @@ CREATE TABLE phpbb_reports ( report_time INTEGER DEFAULT 0 NOT NULL, report_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, reported_post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - reported_post_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - reported_post_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL + reported_post_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, + reported_post_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_reports ADD PRIMARY KEY (report_id);; @@ -1111,6 +1111,29 @@ BEGIN END;; +# Table: 'phpbb_teampage' +CREATE TABLE phpbb_teampage ( + teampage_id INTEGER NOT NULL, + group_id INTEGER DEFAULT 0 NOT NULL, + teampage_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, + teampage_position INTEGER DEFAULT 0 NOT NULL, + teampage_parent INTEGER DEFAULT 0 NOT NULL +);; + +ALTER TABLE phpbb_teampage ADD PRIMARY KEY (teampage_id);; + + +CREATE GENERATOR phpbb_teampage_gen;; +SET GENERATOR phpbb_teampage_gen TO 0;; + +CREATE TRIGGER t_phpbb_teampage FOR phpbb_teampage +BEFORE INSERT +AS +BEGIN + NEW.teampage_id = GEN_ID(phpbb_teampage_gen, 1); +END;; + + # Table: 'phpbb_topics' CREATE TABLE phpbb_topics ( topic_id INTEGER NOT NULL, diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 84c975942f..bc7164325d 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -1111,8 +1111,8 @@ CREATE TABLE [phpbb_reports] ( [report_time] [int] DEFAULT (0) NOT NULL , [report_text] [text] DEFAULT ('') NOT NULL , [reported_post_text] [text] DEFAULT ('') NOT NULL , - [reported_post_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , - [reported_post_uid] [varchar] (8) DEFAULT ('') NOT NULL + [reported_post_uid] [varchar] (8) DEFAULT ('') NOT NULL , + [reported_post_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO @@ -1345,6 +1345,26 @@ GO /* + Table: 'phpbb_teampage' +*/ +CREATE TABLE [phpbb_teampage] ( + [teampage_id] [int] IDENTITY (1, 1) NOT NULL , + [group_id] [int] DEFAULT (0) NOT NULL , + [teampage_name] [varchar] (255) DEFAULT ('') NOT NULL , + [teampage_position] [int] DEFAULT (0) NOT NULL , + [teampage_parent] [int] DEFAULT (0) NOT NULL +) ON [PRIMARY] +GO + +ALTER TABLE [phpbb_teampage] WITH NOCHECK ADD + CONSTRAINT [PK_phpbb_teampage] PRIMARY KEY CLUSTERED + ( + [teampage_id] + ) ON [PRIMARY] +GO + + +/* Table: 'phpbb_topics' */ CREATE TABLE [phpbb_topics] ( diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index 8aab949103..ce4c43c9c3 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -649,8 +649,8 @@ CREATE TABLE phpbb_reports ( report_time int(11) UNSIGNED DEFAULT '0' NOT NULL, report_text mediumblob NOT NULL, reported_post_text mediumblob NOT NULL, - reported_post_bitfield varbinary(255) DEFAULT '' NOT NULL, reported_post_uid varbinary(8) DEFAULT '' NOT NULL, + reported_post_bitfield varbinary(255) DEFAULT '' NOT NULL, PRIMARY KEY (report_id), KEY post_id (post_id), KEY pm_id (pm_id) @@ -773,6 +773,17 @@ CREATE TABLE phpbb_styles ( ); +# Table: 'phpbb_teampage' +CREATE TABLE phpbb_teampage ( + teampage_id mediumint(8) UNSIGNED NOT NULL auto_increment, + group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + teampage_name blob NOT NULL, + teampage_position mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + teampage_parent mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (teampage_id) +); + + # Table: 'phpbb_topics' CREATE TABLE phpbb_topics ( topic_id mediumint(8) UNSIGNED NOT NULL auto_increment, diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 04aef2844a..c15a3f81d5 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -649,8 +649,8 @@ CREATE TABLE phpbb_reports ( report_time int(11) UNSIGNED DEFAULT '0' NOT NULL, report_text mediumtext NOT NULL, reported_post_text mediumtext NOT NULL, - reported_post_bitfield varchar(255) DEFAULT '' NOT NULL, reported_post_uid varchar(8) DEFAULT '' NOT NULL, + reported_post_bitfield varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (report_id), KEY post_id (post_id), KEY pm_id (pm_id) @@ -773,6 +773,17 @@ CREATE TABLE phpbb_styles ( ) CHARACTER SET `utf8` COLLATE `utf8_bin`; +# Table: 'phpbb_teampage' +CREATE TABLE phpbb_teampage ( + teampage_id mediumint(8) UNSIGNED NOT NULL auto_increment, + group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + teampage_name varchar(255) DEFAULT '' NOT NULL, + teampage_position mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + teampage_parent mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (teampage_id) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + # Table: 'phpbb_topics' CREATE TABLE phpbb_topics ( topic_id mediumint(8) UNSIGNED NOT NULL auto_increment, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 91f906bc8b..95f23c7359 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -1216,8 +1216,8 @@ CREATE TABLE phpbb_reports ( report_time number(11) DEFAULT '0' NOT NULL, report_text clob DEFAULT '' , reported_post_text clob DEFAULT '' , - reported_post_bitfield varchar2(255) DEFAULT '' , reported_post_uid varchar2(8) DEFAULT '' , + reported_post_bitfield varchar2(255) DEFAULT '' , CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id) ) / @@ -1475,6 +1475,36 @@ END; /* + Table: 'phpbb_teampage' +*/ +CREATE TABLE phpbb_teampage ( + teampage_id number(8) NOT NULL, + group_id number(8) DEFAULT '0' NOT NULL, + teampage_name varchar2(765) DEFAULT '' , + teampage_position number(8) DEFAULT '0' NOT NULL, + teampage_parent number(8) DEFAULT '0' NOT NULL, + CONSTRAINT pk_phpbb_teampage PRIMARY KEY (teampage_id) +) +/ + + +CREATE SEQUENCE phpbb_teampage_seq +/ + +CREATE OR REPLACE TRIGGER t_phpbb_teampage +BEFORE INSERT ON phpbb_teampage +FOR EACH ROW WHEN ( + new.teampage_id IS NULL OR new.teampage_id = 0 +) +BEGIN + SELECT phpbb_teampage_seq.nextval + INTO :new.teampage_id + FROM dual; +END; +/ + + +/* Table: 'phpbb_topics' */ CREATE TABLE phpbb_topics ( diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 619985e0d6..15d50035d6 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -855,8 +855,8 @@ CREATE TABLE phpbb_reports ( report_time INT4 DEFAULT '0' NOT NULL CHECK (report_time >= 0), report_text TEXT DEFAULT '' NOT NULL, reported_post_text TEXT DEFAULT '' NOT NULL, - reported_post_bitfield varchar(255) DEFAULT '' NOT NULL, reported_post_uid varchar(8) DEFAULT '' NOT NULL, + reported_post_bitfield varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (report_id) ); @@ -1008,6 +1008,21 @@ CREATE TABLE phpbb_styles ( CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name); /* + Table: 'phpbb_teampage' +*/ +CREATE SEQUENCE phpbb_teampage_seq; + +CREATE TABLE phpbb_teampage ( + teampage_id INT4 DEFAULT nextval('phpbb_teampage_seq'), + group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0), + teampage_name varchar(255) DEFAULT '' NOT NULL, + teampage_position INT4 DEFAULT '0' NOT NULL CHECK (teampage_position >= 0), + teampage_parent INT4 DEFAULT '0' NOT NULL CHECK (teampage_parent >= 0), + PRIMARY KEY (teampage_id) +); + + +/* Table: 'phpbb_topics' */ CREATE SEQUENCE phpbb_topics_seq; diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 1690a7dcab..f5d5d8e0bf 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -630,8 +630,8 @@ CREATE TABLE phpbb_reports ( report_time INTEGER UNSIGNED NOT NULL DEFAULT '0', report_text mediumtext(16777215) NOT NULL DEFAULT '', reported_post_text mediumtext(16777215) NOT NULL DEFAULT '', - reported_post_bitfield varchar(255) NOT NULL DEFAULT '', - reported_post_uid varchar(8) NOT NULL DEFAULT '' + reported_post_uid varchar(8) NOT NULL DEFAULT '', + reported_post_bitfield varchar(255) NOT NULL DEFAULT '' ); CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id); @@ -748,6 +748,16 @@ CREATE TABLE phpbb_styles ( CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name); +# Table: 'phpbb_teampage' +CREATE TABLE phpbb_teampage ( + teampage_id INTEGER PRIMARY KEY NOT NULL , + group_id INTEGER UNSIGNED NOT NULL DEFAULT '0', + teampage_name varchar(255) NOT NULL DEFAULT '', + teampage_position INTEGER UNSIGNED NOT NULL DEFAULT '0', + teampage_parent INTEGER UNSIGNED NOT NULL DEFAULT '0' +); + + # Table: 'phpbb_topics' CREATE TABLE phpbb_topics ( topic_id INTEGER PRIMARY KEY NOT NULL , |