diff --git a/phpBB/phpbb/db/migration/data/v400/add_notification_push_table.php b/phpBB/phpbb/db/migration/data/v400/add_notification_push_table.php new file mode 100644 index 0000000000..0d71f5fb60 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v400/add_notification_push_table.php @@ -0,0 +1,55 @@ + + * @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'], + ]; + } +}