ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilNotificationUpdateSteps11.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24{
25 protected ilDBInterface $db;
26
27 public function prepare(ilDBInterface $db): void
28 {
29 $this->db = $db;
30 }
31
32 public function step_1(): void
33 {
34 if (!$this->db->tableExists('push_subscriptions')) {
35 $this->db->createTable(
36 'push_subscriptions',
37 [
38 "endpoint" => [
39 'type' => ilDBConstants::T_TEXT,
40 'notnull' => true,
41 ],
42 "user_id" => [
44 'notnull' => true,
45 ],
46 "p256dh" => [
47 'type' => ilDBConstants::T_TEXT,
48 'notnull' => true,
49 'length' => 87
50 ],
51 "auth" => [
52 'type' => ilDBConstants::T_TEXT,
53 'notnull' => true,
54 'length' => 22
55 ],
56 ]
57 );
58 $this->db->addIndex('push_subscriptions', ['user_id'], 'i1');
59 $this->db->addPrimaryKey('push_subscriptions', ['auth']);
60 }
61 }
62}
Interface ilDBInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...