1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/11413] Schema changes and migration file

Notifications tables are dropped because phpBB currently does not have
any way to make the necessary changes to the DB schema (and no release
has yet been made with these changes).

This will fix the following bugs:
PHPBB3-11411
PHPBB3-11413
PHPBB3-11414
PHPBB3-11416
PHPBB3-11420

PHPBB3-11413
This commit is contained in:
Nathaniel Guse
2013-04-28 22:53:05 -05:00
parent c182ab0e7b
commit 198b992dce
10 changed files with 304 additions and 115 deletions

View File

@@ -452,16 +452,18 @@ CREATE TABLE phpbb_modules (
# Table: 'phpbb_notification_types'
CREATE TABLE phpbb_notification_types (
notification_type varchar(255) DEFAULT '' NOT NULL,
notification_type_id smallint(4) UNSIGNED NOT NULL auto_increment,
notification_type_name varchar(255) DEFAULT '' NOT NULL,
notification_type_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
PRIMARY KEY (notification_type, notification_type_enabled)
PRIMARY KEY (notification_type_id),
UNIQUE type (notification_type_name)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_notifications'
CREATE TABLE phpbb_notifications (
notification_id mediumint(8) UNSIGNED NOT NULL auto_increment,
item_type varchar(255) DEFAULT '' NOT NULL,
notification_id int(10) UNSIGNED NOT NULL auto_increment,
notification_type_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
item_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
item_parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
@@ -469,7 +471,7 @@ CREATE TABLE phpbb_notifications (
notification_time int(11) UNSIGNED DEFAULT '1' NOT NULL,
notification_data text NOT NULL,
PRIMARY KEY (notification_id),
KEY item_ident (item_type, item_id),
KEY item_ident (notification_type_id, item_id),
KEY user (user_id, notification_read)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
@@ -911,7 +913,7 @@ CREATE TABLE phpbb_topics_watch (
# Table: 'phpbb_user_notifications'
CREATE TABLE phpbb_user_notifications (
item_type varchar(255) DEFAULT '' NOT NULL,
notification_type_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
item_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
method varchar(255) DEFAULT '' NOT NULL,