aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/database_update.php51
1 files changed, 49 insertions, 2 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 0b470ced26..c3c2da4451 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -106,6 +106,14 @@ if (!defined('EXT_TABLE'))
{
define('EXT_TABLE', $table_prefix . 'ext');
}
+if (!defined('NOTIFICATIONS_TABLE'))
+{
+ define('NOTIFICATIONS_TABLE', $table_prefix . 'notifications');
+}
+if (!defined('USER_NOTIFICATIONS_TABLE'))
+{
+ define('USER_NOTIFICATIONS_TABLE', $table_prefix . 'user_notifications');
+}
$phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', $phpbb_root_path . 'ext/', ".$phpEx");
$phpbb_class_loader_ext->register();
@@ -1097,6 +1105,45 @@ function database_update_info()
'ext_name' => array('UNIQUE', 'ext_name'),
),
),
+ NOTIFICATIONS_TABLE => array(
+ 'COLUMNS' => array(
+ 'item_type' => array('VCHAR:25', ''),
+ 'item_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'unread' => array('BOOL', 1),
+ 'time' => array('TIMESTAMP', 1),
+ 'data' => array('TEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => array(
+ 'item_type',
+ 'item_id',
+ 'user_id',
+ ),
+ 'KEYS' => array(
+ 'item_type' => array('INDEX', 'item_type'),
+ 'item_id' => array('INDEX', 'item_id'),
+ 'user_id' => array('INDEX', 'user_id'),
+ 'time' => array('INDEX', 'time'),
+ ),
+ ),
+ USER_NOTIFICATIONS_TABLE => array(
+ 'COLUMNS' => array(
+ 'item_type' => array('VCHAR:25', ''),
+ 'item_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'method' => array('VCHAR:25', ''),
+ ),
+ 'PRIMARY_KEY' => array(
+ 'item_type',
+ 'item_id',
+ 'user_id',
+ 'method',
+ ),
+ 'KEYS' => array(
+ 'it' => array('INDEX', 'item_type'),
+ 'uid' => array('INDEX', 'user_id'),
+ ),
+ ),
),
'add_columns' => array(
GROUPS_TABLE => array(
@@ -2629,10 +2676,10 @@ function change_database_data(&$no_updates, $version)
// Create config value for displaying last subject on forum list
if (!isset($config['display_last_subject']))
- {
+ {
$config->set('display_last_subject', '1');
}
-
+
$no_updates = false;
if (!isset($config['assets_version']))