1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/11103] Add tables to the database updater and installer

PHPBB3-11103
This commit is contained in:
Nathan Guse
2012-09-08 13:09:34 -05:00
parent 32a966b21d
commit b594635526
5 changed files with 140 additions and 19 deletions

View File

@@ -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('UINT', 0),
'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('UINT', 0),
'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(