forked from phpbb/phpbb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ticket/14754] Use dedicated table to stop receiving notifications
PHPBB3-14754
- Loading branch information
Showing
6 changed files
with
121 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
phpBB/phpbb/db/migration/data/v32x/add_email_notifications_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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', | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters