mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-13 20:24:08 +02:00
[ticket/11103] Create schema files with notification tables
PHPBB3-11103
This commit is contained in:
@@ -751,6 +751,47 @@ CREATE INDEX [class_left_id] ON [phpbb_modules]([module_class], [left_id]) ON [
|
||||
GO
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_notifications'
|
||||
*/
|
||||
CREATE TABLE [phpbb_notifications] (
|
||||
[notification_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[item_type] [varchar] (25) DEFAULT ('') NOT NULL ,
|
||||
[item_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[item_parent_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[user_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[unread] [int] DEFAULT (1) NOT NULL ,
|
||||
[time] [int] DEFAULT (1) NOT NULL ,
|
||||
[data] [varchar] (4000) DEFAULT ('') NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_notifications] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_notifications] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[notification_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [item_type] ON [phpbb_notifications]([item_type]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [item_id] ON [phpbb_notifications]([item_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [item_pid] ON [phpbb_notifications]([item_parent_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [user_id] ON [phpbb_notifications]([user_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [time] ON [phpbb_notifications]([time]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [unread] ON [phpbb_notifications]([unread]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_poll_options'
|
||||
*/
|
||||
@@ -1110,7 +1151,7 @@ CREATE TABLE [phpbb_reports] (
|
||||
[report_closed] [int] DEFAULT (0) NOT NULL ,
|
||||
[report_time] [int] DEFAULT (0) NOT NULL ,
|
||||
[report_text] [text] DEFAULT ('') NOT NULL ,
|
||||
[reported_post_text] [text] DEFAULT ('') NOT NULL
|
||||
[reported_post_text] [text] DEFAULT ('') NOT NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
GO
|
||||
|
||||
@@ -1474,6 +1515,34 @@ CREATE INDEX [notify_stat] ON [phpbb_topics_watch]([notify_status]) ON [PRIMARY
|
||||
GO
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_user_notifications'
|
||||
*/
|
||||
CREATE TABLE [phpbb_user_notifications] (
|
||||
[item_type] [varchar] (25) DEFAULT ('') NOT NULL ,
|
||||
[item_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[user_id] [int] DEFAULT (0) NOT NULL ,
|
||||
[method] [varchar] (25) DEFAULT ('') NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_user_notifications] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_user_notifications] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[item_type],
|
||||
[item_id],
|
||||
[user_id],
|
||||
[method]
|
||||
) 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
|
||||
|
||||
|
||||
/*
|
||||
Table: 'phpbb_user_group'
|
||||
*/
|
||||
|
Reference in New Issue
Block a user