1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

[ticket/14754] Use dedicated table to stop receiving notifications

PHPBB3-14754
This commit is contained in:
Jakub Senko
2018-10-18 09:35:16 +02:00
committed by Marc Alexander
parent a3e0117ff0
commit f3664b07d2
6 changed files with 121 additions and 73 deletions

View File

@@ -0,0 +1,50 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
namespace phpbb\db\migration\data\v32x;
class add_email_notifications_table extends \phpbb\db\migration\migration
{
static public function depends_on()
{
return array(
'\phpbb\db\migration\data\v32x\v323',
);
}
public function update_schema()
{
return array(
'add_tables' => array(
$this->table_prefix . 'email_notifications' => array(
'COLUMNS' => array(
'notification_type_id' => array('USINT', 0),
'item_id' => array('UINT', 0),
'item_parent_id' => array('UINT', 0),
'user_id' => array('UINT', 0),
),
'PRIMARY_KEY' => array('notification_type_id', 'item_id', 'item_parent_id', 'user_id'),
),
),
);
}
public function revert_schema()
{
return array(
'drop_tables' => array(
$this->table_prefix . 'email_notifications',
),
);
}
}