mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/17010] Switch to using table for tracking push subscriptions
PHPBB3-17010
This commit is contained in:
@@ -43,13 +43,18 @@ class add_webpush extends migration
|
||||
],
|
||||
'PRIMARY_KEY' => ['notification_type_id', 'item_id', 'item_parent_id', 'user_id'],
|
||||
],
|
||||
],
|
||||
'add_columns' => [
|
||||
$this->table_prefix . 'users' => [
|
||||
$this->table_prefix . 'push_subscriptions' => [
|
||||
'COLUMNS' => [
|
||||
'user_push_subscriptions' => ['MTEXT_UNI', '']
|
||||
'subscription_id' => ['ULINT', null, 'auto_increment'],
|
||||
'user_id' => ['ULINT', 0],
|
||||
'device_name' => ['VCHAR:64', ''],
|
||||
'endpoint' => ['TEXT', ''],
|
||||
'p256dh' => ['VCHAR', ''],
|
||||
'auth' => ['VCHAR', ''],
|
||||
'encoding' => ['VCHAR:32', ''],
|
||||
],
|
||||
],
|
||||
'PRIMARY_KEY' => ['subscription_id', 'user_id'],
|
||||
]
|
||||
],
|
||||
];
|
||||
}
|
||||
@@ -57,7 +62,10 @@ class add_webpush extends migration
|
||||
public function revert_schema(): array
|
||||
{
|
||||
return [
|
||||
'drop_tables' => [$this->table_prefix . 'notification_push'],
|
||||
'drop_tables' => [
|
||||
$this->table_prefix . 'notification_push',
|
||||
$this->table_prefix . 'push_subscriptions',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user