ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
ilNotificationUpdateSteps11.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
use
ILIAS\Notifications\ilNotificationSetupHelper
;
22
23
readonly
class
ilNotificationUpdateSteps11
implements
ilDatabaseUpdateSteps
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"
=> [
43
'type'
=>
ilDBConstants::T_INTEGER
,
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
}
ILIAS\Notifications\ilNotificationSetupHelper
Definition:
ilNotificationSetupHelper.php:30
ilDBConstants\T_TEXT
const T_TEXT
Definition:
class.ilDBConstants.php:56
ilDBConstants\T_INTEGER
const T_INTEGER
Definition:
class.ilDBConstants.php:55
ilNotificationUpdateSteps11
Definition:
ilNotificationUpdateSteps11.php:24
ilNotificationUpdateSteps11\prepare
prepare(ilDBInterface $db)
Definition:
ilNotificationUpdateSteps11.php:27
ilNotificationUpdateSteps11\step_1
step_1()
Definition:
ilNotificationUpdateSteps11.php:32
ilNotificationUpdateSteps11\$db
ilDBInterface $db
Definition:
ilNotificationUpdateSteps11.php:25
ilDBInterface
Interface ilDBInterface.
Definition:
interface.ilDBInterface.php:30
ilDatabaseUpdateSteps
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
interface.ilDatabaseUpdateSteps.php:44
components
ILIAS
Notifications
classes
Setup
ilNotificationUpdateSteps11.php
Generated on Sat Oct 18 2025 23:03:31 for ILIAS by
1.9.4 (using
Doxyfile
)