aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-11-13 11:29:25 +0100
committerJoas Schilling <nickvergessen@gmx.de>2012-11-13 11:29:25 +0100
commitdf735f46033a92657dce004c2d5ece6866565208 (patch)
tree3660ffcae878eff7c0ce1e139e5c80f25f76d309 /phpBB/install
parentff7465e75f129d23a0f9f4fd6a1c556ec2b7bb13 (diff)
downloadforums-df735f46033a92657dce004c2d5ece6866565208.tar
forums-df735f46033a92657dce004c2d5ece6866565208.tar.gz
forums-df735f46033a92657dce004c2d5ece6866565208.tar.bz2
forums-df735f46033a92657dce004c2d5ece6866565208.tar.xz
forums-df735f46033a92657dce004c2d5ece6866565208.zip
[ticket/10411] Add new table for teampage
PHPBB3-10411
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/schemas/firebird_schema.sql27
-rw-r--r--phpBB/install/schemas/mssql_schema.sql24
-rw-r--r--phpBB/install/schemas/mysql_40_schema.sql13
-rw-r--r--phpBB/install/schemas/mysql_41_schema.sql13
-rw-r--r--phpBB/install/schemas/oracle_schema.sql32
-rw-r--r--phpBB/install/schemas/postgres_schema.sql17
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql14
7 files changed, 130 insertions, 10 deletions
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 ,