aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/database_update.php54
1 files changed, 52 insertions, 2 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 5fa6166913..562871be57 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -110,6 +110,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_container = new ContainerBuilder();
$loader = new YamlFileLoader($phpbb_container, new FileLocator(__DIR__.'/../config'));
@@ -1117,6 +1125,48 @@ 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),
+ 'item_parent_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'),
+ 'item_pid' => array('INDEX', 'item_parent_id'),
+ 'user_id' => array('INDEX', 'user_id'),
+ 'time' => array('INDEX', 'time'),
+ 'unread' => array('INDEX', 'unread'),
+ ),
+ ),
+ 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(
@@ -2649,10 +2699,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']))