mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-23 10:28:55 +00:00
[ticket/17010] Add migration for notificatio_push table
PHPBB3-17010
This commit is contained in:
parent
5c51f2ef7f
commit
3feeb237ca
1 changed files with 55 additions and 0 deletions
|
@ -0,0 +1,55 @@
|
||||||
|
<?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\v400;
|
||||||
|
|
||||||
|
use phpbb\db\migration\migration;
|
||||||
|
|
||||||
|
class add_notification_push_table extends migration
|
||||||
|
{
|
||||||
|
public static function depends_on(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'\phpbb\db\migration\data\v400\dev',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function effectively_installed(): bool
|
||||||
|
{
|
||||||
|
return $this->db_tools->sql_table_exists($this->table_prefix . 'notification_push');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update_schema(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'add_tables' => [
|
||||||
|
$this->table_prefix . 'notification_push' => [
|
||||||
|
'COLUMNS' => [
|
||||||
|
'notification_type_id' => ['USINT', 0],
|
||||||
|
'item_id' => ['ULINT', 0],
|
||||||
|
'item_parent_id' => ['ULINT', 0],
|
||||||
|
'user_id' => ['ULINT', 0],
|
||||||
|
],
|
||||||
|
'PRIMARY_KEY' => ['notification_type_id', 'item_id', 'item_parent_id', 'user_id'],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function revert_schema(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'drop_tables' => [$this->table_prefix . 'notification_push'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue