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

[ticket/11103] Add is_disabled column to notifications table

EXTENSION AUTHORS TAKE NOTE! This is to prevent errors with notifications
from extensions!

Set is_disabled to 1 for all your notifications when your extension is
disabled so they are ignored and do not cause errors.

When your extension is enabled again, set is_disabled to 0 and your
notifications will be working again.

PHPBB3-11103
This commit is contained in:
Nathan Guse
2012-10-13 23:24:30 -05:00
parent cb93784126
commit 94ffbb4050
14 changed files with 45 additions and 12 deletions

View File

@@ -626,6 +626,7 @@ 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_disabled INTEGER DEFAULT 0 NOT NULL,
time INTEGER DEFAULT 1 NOT NULL,
data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
);;
@@ -638,6 +639,7 @@ CREATE INDEX phpbb_notifications_item_pid ON phpbb_notifications(item_parent_id)
CREATE INDEX phpbb_notifications_user_id ON phpbb_notifications(user_id);;
CREATE INDEX phpbb_notifications_time ON phpbb_notifications(time);;
CREATE INDEX phpbb_notifications_unread ON phpbb_notifications(unread);;
CREATE INDEX phpbb_notifications_is_disabled ON phpbb_notifications(is_disabled);;
CREATE GENERATOR phpbb_notifications_gen;;
SET GENERATOR phpbb_notifications_gen TO 0;;

View File

@@ -761,6 +761,7 @@ 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_disabled] [int] DEFAULT (0) NOT NULL ,
[time] [int] DEFAULT (1) NOT NULL ,
[data] [varchar] (4000) DEFAULT ('') NOT NULL
) ON [PRIMARY]
@@ -791,6 +792,9 @@ GO
CREATE INDEX [unread] ON [phpbb_notifications]([unread]) ON [PRIMARY]
GO
CREATE INDEX [is_disabled] ON [phpbb_notifications]([is_disabled]) ON [PRIMARY]
GO
/*
Table: 'phpbb_poll_options'

View File

@@ -438,6 +438,7 @@ 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_disabled tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
time int(11) UNSIGNED DEFAULT '1' NOT NULL,
data blob NOT NULL,
PRIMARY KEY (notification_id),
@@ -446,7 +447,8 @@ CREATE TABLE phpbb_notifications (
KEY item_pid (item_parent_id),
KEY user_id (user_id),
KEY time (time),
KEY unread (unread)
KEY unread (unread),
KEY is_disabled (is_disabled)
);

View File

@@ -438,6 +438,7 @@ 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_disabled tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
time int(11) UNSIGNED DEFAULT '1' NOT NULL,
data text NOT NULL,
PRIMARY KEY (notification_id),
@@ -446,7 +447,8 @@ CREATE TABLE phpbb_notifications (
KEY item_pid (item_parent_id),
KEY user_id (user_id),
KEY time (time),
KEY unread (unread)
KEY unread (unread),
KEY is_disabled (is_disabled)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;

View File

@@ -850,6 +850,7 @@ 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_disabled number(1) DEFAULT '0' NOT NULL,
time number(11) DEFAULT '1' NOT NULL,
data clob DEFAULT '' ,
CONSTRAINT pk_phpbb_notifications PRIMARY KEY (notification_id)
@@ -868,6 +869,8 @@ CREATE INDEX phpbb_notifications_time ON phpbb_notifications (time)
/
CREATE INDEX phpbb_notifications_unread ON phpbb_notifications (unread)
/
CREATE INDEX phpbb_notifications_is_disabled ON phpbb_notifications (is_disabled)
/
CREATE SEQUENCE phpbb_notifications_seq
/

View File

@@ -608,6 +608,7 @@ 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_disabled INT2 DEFAULT '0' NOT NULL CHECK (is_disabled >= 0),
time INT4 DEFAULT '1' NOT NULL CHECK (time >= 0),
data varchar(4000) DEFAULT '' NOT NULL,
PRIMARY KEY (notification_id)
@@ -619,6 +620,7 @@ CREATE INDEX phpbb_notifications_item_pid ON phpbb_notifications (item_parent_id
CREATE INDEX phpbb_notifications_user_id ON phpbb_notifications (user_id);
CREATE INDEX phpbb_notifications_time ON phpbb_notifications (time);
CREATE INDEX phpbb_notifications_unread ON phpbb_notifications (unread);
CREATE INDEX phpbb_notifications_is_disabled ON phpbb_notifications (is_disabled);
/*
Table: 'phpbb_poll_options'

View File

@@ -425,6 +425,7 @@ 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_disabled INTEGER UNSIGNED NOT NULL DEFAULT '0',
time INTEGER UNSIGNED NOT NULL DEFAULT '1',
data text(65535) NOT NULL DEFAULT ''
);
@@ -435,6 +436,7 @@ CREATE INDEX phpbb_notifications_item_pid ON phpbb_notifications (item_parent_id
CREATE INDEX phpbb_notifications_user_id ON phpbb_notifications (user_id);
CREATE INDEX phpbb_notifications_time ON phpbb_notifications (time);
CREATE INDEX phpbb_notifications_unread ON phpbb_notifications (unread);
CREATE INDEX phpbb_notifications_is_disabled ON phpbb_notifications (is_disabled);
# Table: 'phpbb_poll_options'
CREATE TABLE phpbb_poll_options (