diff options
Diffstat (limited to 'phpBB/install')
-rw-r--r-- | phpBB/install/database_update.php | 11 | ||||
-rw-r--r-- | phpBB/install/schemas/firebird_schema.sql | 13 | ||||
-rw-r--r-- | phpBB/install/schemas/mssql_schema.sql | 28 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_40_schema.sql | 14 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_41_schema.sql | 14 | ||||
-rw-r--r-- | phpBB/install/schemas/oracle_schema.sql | 18 | ||||
-rw-r--r-- | phpBB/install/schemas/postgres_schema.sql | 14 | ||||
-rw-r--r-- | phpBB/install/schemas/sqlite_schema.sql | 12 |
8 files changed, 85 insertions, 39 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 0250b53a19..ae810e1022 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -93,6 +93,10 @@ if (!defined('LOGIN_ATTEMPT_TABLE')) { define('LOGIN_ATTEMPT_TABLE', $table_prefix . 'login_attempts'); } +if (!defined('NOTIFICATION_TYPES_TABLE')) +{ + define('NOTIFICATION_TYPES_TABLE', $table_prefix . 'notification_types'); +} if (!defined('NOTIFICATIONS_TABLE')) { define('NOTIFICATIONS_TABLE', $table_prefix . 'notifications'); @@ -1179,6 +1183,13 @@ function database_update_info() 'ext_name' => array('UNIQUE', 'ext_name'), ), ), + NOTIFICATION_TYPES_TABLE => array( + 'COLUMNS' => array( + 'notification_type' => array('VCHAR:255', ''), + 'notification_type_enabled' => array('BOOL', 1), + ), + 'PRIMARY_KEY' => array('notification_type', 'notification_type_enabled'), + ), NOTIFICATIONS_TABLE => array( 'COLUMNS' => array( 'notification_id' => array('UINT', NULL, 'auto_increment'), diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index d3058fb0dd..5f7d23e411 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -618,6 +618,15 @@ BEGIN END;; +# Table: 'phpbb_notification_types' +CREATE TABLE phpbb_notification_types ( + notification_type VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + notification_type_enabled INTEGER DEFAULT 1 NOT NULL +);; + +ALTER TABLE phpbb_notification_types ADD PRIMARY KEY (notification_type, notification_type_enabled);; + + # Table: 'phpbb_notifications' CREATE TABLE phpbb_notifications ( notification_id INTEGER NOT NULL, @@ -626,7 +635,6 @@ CREATE TABLE phpbb_notifications ( item_parent_id INTEGER DEFAULT 0 NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, unread INTEGER DEFAULT 1 NOT NULL, - is_enabled INTEGER DEFAULT 1 NOT NULL, time INTEGER DEFAULT 1 NOT NULL, data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL );; @@ -1243,9 +1251,6 @@ CREATE TABLE phpbb_user_notifications ( ALTER TABLE phpbb_user_notifications ADD PRIMARY KEY (item_type, item_id, user_id, method);; -CREATE INDEX phpbb_user_notifications_it ON phpbb_user_notifications(item_type);; -CREATE INDEX phpbb_user_notifications_uid ON phpbb_user_notifications(user_id);; -CREATE INDEX phpbb_user_notifications_no ON phpbb_user_notifications(notify);; # Table: 'phpbb_user_group' CREATE TABLE phpbb_user_group ( diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 377ff92620..15529cde38 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -752,6 +752,24 @@ GO /* + Table: 'phpbb_notification_types' +*/ +CREATE TABLE [phpbb_notification_types] ( + [notification_type] [varchar] (255) DEFAULT ('') NOT NULL , + [notification_type_enabled] [int] DEFAULT (1) NOT NULL +) ON [PRIMARY] +GO + +ALTER TABLE [phpbb_notification_types] WITH NOCHECK ADD + CONSTRAINT [PK_phpbb_notification_types] PRIMARY KEY CLUSTERED + ( + [notification_type], + [notification_type_enabled] + ) ON [PRIMARY] +GO + + +/* Table: 'phpbb_notifications' */ CREATE TABLE [phpbb_notifications] ( @@ -761,7 +779,6 @@ CREATE TABLE [phpbb_notifications] ( [item_parent_id] [int] DEFAULT (0) NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , [unread] [int] DEFAULT (1) NOT NULL , - [is_enabled] [int] DEFAULT (1) NOT NULL , [time] [int] DEFAULT (1) NOT NULL , [data] [varchar] (4000) DEFAULT ('') NOT NULL ) ON [PRIMARY] @@ -1528,15 +1545,6 @@ ALTER TABLE [phpbb_user_notifications] WITH NOCHECK ADD ) ON [PRIMARY] GO -CREATE INDEX [it] ON [phpbb_user_notifications]([item_type]) ON [PRIMARY] -GO - -CREATE INDEX [uid] ON [phpbb_user_notifications]([user_id]) ON [PRIMARY] -GO - -CREATE INDEX [no] ON [phpbb_user_notifications]([notify]) ON [PRIMARY] -GO - /* Table: 'phpbb_user_group' diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index 4ceb664cd3..f295664c64 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -430,6 +430,14 @@ CREATE TABLE phpbb_modules ( ); +# Table: 'phpbb_notification_types' +CREATE TABLE phpbb_notification_types ( + notification_type varbinary(255) DEFAULT '' NOT NULL, + notification_type_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + PRIMARY KEY (notification_type, notification_type_enabled) +); + + # Table: 'phpbb_notifications' CREATE TABLE phpbb_notifications ( notification_id mediumint(8) UNSIGNED NOT NULL auto_increment, @@ -438,7 +446,6 @@ CREATE TABLE phpbb_notifications ( item_parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - is_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, time int(11) UNSIGNED DEFAULT '1' NOT NULL, data blob NOT NULL, PRIMARY KEY (notification_id), @@ -875,10 +882,7 @@ CREATE TABLE phpbb_user_notifications ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, method varbinary(255) DEFAULT '' NOT NULL, notify tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - PRIMARY KEY (item_type, item_id, user_id, method), - KEY it (item_type), - KEY uid (user_id), - KEY no (notify) + PRIMARY KEY (item_type, item_id, user_id, method) ); diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 423b97567a..bfba8e5f64 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -430,6 +430,14 @@ CREATE TABLE phpbb_modules ( ) CHARACTER SET `utf8` COLLATE `utf8_bin`; +# Table: 'phpbb_notification_types' +CREATE TABLE phpbb_notification_types ( + notification_type varchar(255) DEFAULT '' NOT NULL, + notification_type_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + PRIMARY KEY (notification_type, notification_type_enabled) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + # Table: 'phpbb_notifications' CREATE TABLE phpbb_notifications ( notification_id mediumint(8) UNSIGNED NOT NULL auto_increment, @@ -438,7 +446,6 @@ CREATE TABLE phpbb_notifications ( item_parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - is_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, time int(11) UNSIGNED DEFAULT '1' NOT NULL, data text NOT NULL, PRIMARY KEY (notification_id), @@ -875,10 +882,7 @@ CREATE TABLE phpbb_user_notifications ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, method varchar(255) DEFAULT '' NOT NULL, notify tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - PRIMARY KEY (item_type, item_id, user_id, method), - KEY it (item_type), - KEY uid (user_id), - KEY no (notify) + PRIMARY KEY (item_type, item_id, user_id, method) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index b3ea3c7d5e..aae49afd70 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -841,6 +841,17 @@ END; /* + Table: 'phpbb_notification_types' +*/ +CREATE TABLE phpbb_notification_types ( + notification_type varchar2(255) DEFAULT '' , + notification_type_enabled number(1) DEFAULT '1' NOT NULL, + CONSTRAINT pk_phpbb_notification_types PRIMARY KEY (notification_type, notification_type_enabled) +) +/ + + +/* Table: 'phpbb_notifications' */ CREATE TABLE phpbb_notifications ( @@ -850,7 +861,6 @@ CREATE TABLE phpbb_notifications ( item_parent_id number(8) DEFAULT '0' NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, unread number(1) DEFAULT '1' NOT NULL, - is_enabled number(1) DEFAULT '1' NOT NULL, time number(11) DEFAULT '1' NOT NULL, data clob DEFAULT '' , CONSTRAINT pk_phpbb_notifications PRIMARY KEY (notification_id) @@ -1642,12 +1652,6 @@ CREATE TABLE phpbb_user_notifications ( ) / -CREATE INDEX phpbb_user_notifications_it ON phpbb_user_notifications (item_type) -/ -CREATE INDEX phpbb_user_notifications_uid ON phpbb_user_notifications (user_id) -/ -CREATE INDEX phpbb_user_notifications_no ON phpbb_user_notifications (notify) -/ /* Table: 'phpbb_user_group' diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index e43b64468d..05533fc731 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -597,6 +597,16 @@ CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled); CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id); /* + Table: 'phpbb_notification_types' +*/ +CREATE TABLE phpbb_notification_types ( + notification_type varchar(255) DEFAULT '' NOT NULL, + notification_type_enabled INT2 DEFAULT '1' NOT NULL CHECK (notification_type_enabled >= 0), + PRIMARY KEY (notification_type, notification_type_enabled) +); + + +/* Table: 'phpbb_notifications' */ CREATE SEQUENCE phpbb_notifications_seq; @@ -608,7 +618,6 @@ CREATE TABLE phpbb_notifications ( item_parent_id INT4 DEFAULT '0' NOT NULL CHECK (item_parent_id >= 0), user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), unread INT2 DEFAULT '1' NOT NULL CHECK (unread >= 0), - is_enabled INT2 DEFAULT '1' NOT NULL CHECK (is_enabled >= 0), time INT4 DEFAULT '1' NOT NULL CHECK (time >= 0), data varchar(4000) DEFAULT '' NOT NULL, PRIMARY KEY (notification_id) @@ -1128,9 +1137,6 @@ CREATE TABLE phpbb_user_notifications ( PRIMARY KEY (item_type, item_id, user_id, method) ); -CREATE INDEX phpbb_user_notifications_it ON phpbb_user_notifications (item_type); -CREATE INDEX phpbb_user_notifications_uid ON phpbb_user_notifications (user_id); -CREATE INDEX phpbb_user_notifications_no ON phpbb_user_notifications (notify); /* Table: 'phpbb_user_group' diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index e3b556668d..fa61e4104f 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -417,6 +417,14 @@ CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id); CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled); CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id); +# Table: 'phpbb_notification_types' +CREATE TABLE phpbb_notification_types ( + notification_type varchar(255) NOT NULL DEFAULT '', + notification_type_enabled INTEGER UNSIGNED NOT NULL DEFAULT '1', + PRIMARY KEY (notification_type, notification_type_enabled) +); + + # Table: 'phpbb_notifications' CREATE TABLE phpbb_notifications ( notification_id INTEGER PRIMARY KEY NOT NULL , @@ -425,7 +433,6 @@ CREATE TABLE phpbb_notifications ( item_parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0', user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', unread INTEGER UNSIGNED NOT NULL DEFAULT '1', - is_enabled INTEGER UNSIGNED NOT NULL DEFAULT '1', time INTEGER UNSIGNED NOT NULL DEFAULT '1', data text(65535) NOT NULL DEFAULT '' ); @@ -851,9 +858,6 @@ CREATE TABLE phpbb_user_notifications ( PRIMARY KEY (item_type, item_id, user_id, method) ); -CREATE INDEX phpbb_user_notifications_it ON phpbb_user_notifications (item_type); -CREATE INDEX phpbb_user_notifications_uid ON phpbb_user_notifications (user_id); -CREATE INDEX phpbb_user_notifications_no ON phpbb_user_notifications (notify); # Table: 'phpbb_user_group' CREATE TABLE phpbb_user_group ( |