aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/schemas/postgres_schema.sql
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/install/schemas/postgres_schema.sql')
-rw-r--r--phpBB/install/schemas/postgres_schema.sql39
1 files changed, 38 insertions, 1 deletions
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 619985e0d6..e43b64468d 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -597,6 +597,27 @@ 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_notifications'
+*/
+CREATE SEQUENCE phpbb_notifications_seq;
+
+CREATE TABLE phpbb_notifications (
+ notification_id INT4 DEFAULT nextval('phpbb_notifications_seq'),
+ item_type varchar(255) DEFAULT '' NOT NULL,
+ item_id INT4 DEFAULT '0' NOT NULL CHECK (item_id >= 0),
+ 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)
+);
+
+CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications (item_type, item_id);
+CREATE INDEX phpbb_notifications_user ON phpbb_notifications (user_id, unread);
+
+/*
Table: 'phpbb_poll_options'
*/
CREATE TABLE phpbb_poll_options (
@@ -855,8 +876,8 @@ CREATE TABLE phpbb_reports (
report_time INT4 DEFAULT '0' NOT NULL CHECK (report_time >= 0),
report_text TEXT DEFAULT '' NOT NULL,
reported_post_text TEXT DEFAULT '' NOT NULL,
- reported_post_bitfield varchar(255) DEFAULT '' NOT NULL,
reported_post_uid varchar(8) DEFAULT '' NOT NULL,
+ reported_post_bitfield varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (report_id)
);
@@ -1096,6 +1117,22 @@ CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id);
CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status);
/*
+ Table: 'phpbb_user_notifications'
+*/
+CREATE TABLE phpbb_user_notifications (
+ item_type varchar(255) DEFAULT '' NOT NULL,
+ item_id INT4 DEFAULT '0' NOT NULL CHECK (item_id >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ method varchar(255) DEFAULT '' NOT NULL,
+ notify INT2 DEFAULT '1' NOT NULL CHECK (notify >= 0),
+ 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 (