diff options
author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-03-04 13:25:53 -0600 |
---|---|---|
committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-03-04 13:25:53 -0600 |
commit | 029f096411f620f2066608cd0a1e8711f88da9e1 (patch) | |
tree | c470b9a0ebccca8cc3a6d6db6e1baa30556801b0 /phpBB/install/schemas | |
parent | 5695097b8a691d2c18615e59420ed383b6a34af3 (diff) | |
parent | 19c3917de985d04f994bc22bcec1e814aa2e207c (diff) | |
download | forums-029f096411f620f2066608cd0a1e8711f88da9e1.tar forums-029f096411f620f2066608cd0a1e8711f88da9e1.tar.gz forums-029f096411f620f2066608cd0a1e8711f88da9e1.tar.bz2 forums-029f096411f620f2066608cd0a1e8711f88da9e1.tar.xz forums-029f096411f620f2066608cd0a1e8711f88da9e1.zip |
Merge remote-tracking branch 'remotes/nickv/ticket/10411-2' into develop
# By Joas Schilling
# Via Joas Schilling
* remotes/nickv/ticket/10411-2: (33 commits)
[ticket/10411] Fix call to function on non-object $db->...()
[ticket/10411] Remove ajax delete, so the page is refreshed
[ticket/10411] Update schema file with new table and remove the column
[ticket/10411] Add unit tests for move() with values >1
[ticket/10411] Add migrations file for teampage table
[ticket/10411] Revert database_update.php changes from for easier update
[ticket/10411] Add maxlength to category name input field
[ticket/10411] Test for thrown exceptions when group does not exist
[ticket/10411] Catch exceptions from grouppositions
[ticket/10411] Throw exceptions instead of using trigger_error()
[ticket/10411] Add return values to add/delete function
[ticket/10411] Add return value to move functions
[ticket/10411] Fix typehinting and change private to protected
[ticket/10411] Use template loops instead of defining the html in php files
[ticket/10411] Ensure we only get services that do exist
[ticket/10411] Add a comment why we left join the group table
[ticket/10411] Rename template variable CUR_ to CURRENT_
[ticket/10411] Move globals to the top and use array for cache destroy
[ticket/10411] Use new ajax callback name row_up/row_down
[ticket/10411] Fix logic error when editing/creating a group
...
Diffstat (limited to 'phpBB/install/schemas')
-rw-r--r-- | phpBB/install/schemas/firebird_schema.sql | 26 | ||||
-rw-r--r-- | phpBB/install/schemas/mssql_schema.sql | 23 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_40_schema.sql | 12 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_41_schema.sql | 12 | ||||
-rw-r--r-- | phpBB/install/schemas/oracle_schema.sql | 31 | ||||
-rw-r--r-- | phpBB/install/schemas/postgres_schema.sql | 16 | ||||
-rw-r--r-- | phpBB/install/schemas/schema_data.sql | 18 | ||||
-rw-r--r-- | phpBB/install/schemas/sqlite_schema.sql | 13 |
8 files changed, 134 insertions, 17 deletions
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index d0f8d8e70f..2cb68ce0ae 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -454,8 +454,7 @@ CREATE TABLE phpbb_groups ( group_receive_pm INTEGER DEFAULT 0 NOT NULL, group_message_limit INTEGER DEFAULT 0 NOT NULL, group_max_recipients INTEGER DEFAULT 0 NOT NULL, - group_legend INTEGER DEFAULT 0 NOT NULL, - group_teampage INTEGER DEFAULT 0 NOT NULL + group_legend INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_groups ADD PRIMARY KEY (group_id);; @@ -1165,6 +1164,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 3f6c694f32..adcc222b80 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -562,8 +562,7 @@ CREATE TABLE [phpbb_groups] ( [group_receive_pm] [int] DEFAULT (0) NOT NULL , [group_message_limit] [int] DEFAULT (0) NOT NULL , [group_max_recipients] [int] DEFAULT (0) NOT NULL , - [group_legend] [int] DEFAULT (0) NOT NULL , - [group_teampage] [int] DEFAULT (0) NOT NULL + [group_legend] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO @@ -1417,6 +1416,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 42196fe8c3..11721ad1c1 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -327,7 +327,6 @@ CREATE TABLE phpbb_groups ( group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_legend mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_teampage mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (group_id), KEY group_legend_name (group_legend, group_name(255)) ); @@ -813,6 +812,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 c3424bc79b..0e1949cf5e 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -327,7 +327,6 @@ CREATE TABLE phpbb_groups ( group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_legend mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_teampage mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (group_id), KEY group_legend_name (group_legend, group_name) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; @@ -813,6 +812,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 5dfb6ee243..5365013f03 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -620,7 +620,6 @@ CREATE TABLE phpbb_groups ( group_message_limit number(8) DEFAULT '0' NOT NULL, group_max_recipients number(8) DEFAULT '0' NOT NULL, group_legend number(8) DEFAULT '0' NOT NULL, - group_teampage number(8) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_groups PRIMARY KEY (group_id) ) / @@ -1542,6 +1541,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 07ca7f1e95..e1904f789e 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -473,7 +473,6 @@ CREATE TABLE phpbb_groups ( group_message_limit INT4 DEFAULT '0' NOT NULL CHECK (group_message_limit >= 0), group_max_recipients INT4 DEFAULT '0' NOT NULL CHECK (group_max_recipients >= 0), group_legend INT4 DEFAULT '0' NOT NULL CHECK (group_legend >= 0), - group_teampage INT4 DEFAULT '0' NOT NULL CHECK (group_teampage >= 0), PRIMARY KEY (group_id) ); @@ -1056,6 +1055,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/schema_data.sql b/phpBB/install/schemas/schema_data.sql index d145aa37fc..6512f6d7e6 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -461,13 +461,17 @@ INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_reg INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_occ, user_interests, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); # -- Groups -INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_teampage, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GUESTS', 3, 0, '', 0, 0, '', '', '', 5); -INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_teampage, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('REGISTERED', 3, 0, '', 0, 0, '', '', '', 5); -INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_teampage, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('REGISTERED_COPPA', 3, 0, '', 0, 0, '', '', '', 5); -INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_teampage, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GLOBAL_MODERATORS', 3, 0, '00AA00', 2, 2, '', '', '', 0); -INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_teampage, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('ADMINISTRATORS', 3, 1, 'AA0000', 1, 1, '', '', '', 0); -INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_teampage, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('BOTS', 3, 0, '9E8DA7', 0, 0, '', '', '', 5); -INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_teampage, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('NEWLY_REGISTERED', 3, 0, '', 0, 0, '', '', '', 5); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GUESTS', 3, 0, '', 0, '', '', '', 5); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('REGISTERED', 3, 0, '', 0, '', '', '', 5); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('REGISTERED_COPPA', 3, 0, '', 0, '', '', '', 5); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GLOBAL_MODERATORS', 3, 0, '00AA00', 2, '', '', '', 0); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('ADMINISTRATORS', 3, 1, 'AA0000', 1, '', '', '', 0); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('BOTS', 3, 0, '9E8DA7', 0, '', '', '', 5); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('NEWLY_REGISTERED', 3, 0, '', 0, '', '', '', 5); + +# -- Teampage +INSERT INTO phpbb_teampage (group_id, teampage_name, teampage_position, teampage_parent) VALUES (5, '', 1, 0); +INSERT INTO phpbb_teampage (group_id, teampage_name, teampage_position, teampage_parent) VALUES (4, '', 2, 0); # -- User -> Group INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VALUES (1, 1, 0, 0); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 5274e08cca..1d132b6f0b 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -318,8 +318,7 @@ CREATE TABLE phpbb_groups ( group_receive_pm INTEGER UNSIGNED NOT NULL DEFAULT '0', group_message_limit INTEGER UNSIGNED NOT NULL DEFAULT '0', group_max_recipients INTEGER UNSIGNED NOT NULL DEFAULT '0', - group_legend INTEGER UNSIGNED NOT NULL DEFAULT '0', - group_teampage INTEGER UNSIGNED NOT NULL DEFAULT '0' + group_legend INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name); @@ -787,6 +786,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 , |