ILIAS
trunk Revision v12.0_alpha-377-g3641b37b9db
◀ ilDoc Overview
ShortlinksDBSteps11.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\StaticURL\Setup\Shortlinks
;
22
26
class
ShortlinksDBSteps11
implements
\ilDatabaseUpdateSteps
27
{
28
private \ilDBInterface
$db
;
29
30
public
function
prepare
(\
ilDBInterface
$db
): void
31
{
32
$this->db =
$db
;
33
}
34
35
public
function
step_1
(): void
36
{
37
$fields = [
38
'id'
=> [
39
'type'
=>
'text'
,
40
'length'
=> 32,
41
'notnull'
=>
true
,
42
],
43
'alias'
=> [
44
'type'
=>
'text'
,
45
'length'
=> 255,
46
'notnull'
=>
true
47
],
48
'target_type'
=> [
49
'type'
=>
'text'
,
50
'length'
=> 8,
51
'notnull'
=>
true
52
],
53
'target_type_data'
=> [
54
'type'
=>
'clob'
,
55
'notnull'
=>
false
,
56
],
57
'position'
=> [
58
'type'
=>
'integer'
,
59
'notnull'
=>
true
,
60
],
61
'active'
=> [
62
'type'
=>
'integer'
,
63
'length'
=> 1,
64
'notnull'
=>
true
,
65
'default'
=> 1,
66
],
67
'used'
=> [
68
'type'
=>
'integer'
,
69
'notnull'
=>
true
,
70
'default'
=> 0,
71
],
72
];
73
74
$this->db->createTable(
'il_shortlinks'
, $fields);
75
76
$this->db->addPrimaryKey(
77
'il_shortlinks'
,
78
[
'id'
]
79
);
80
81
$this->db->addIndex(
82
'il_shortlinks'
,
83
[
'alias'
],
84
'i1'
85
);
86
}
87
88
}
ILIAS\StaticURL\Setup\Shortlinks\ShortlinksDBSteps11
Definition:
ShortlinksDBSteps11.php:27
ILIAS\StaticURL\Setup\Shortlinks\ShortlinksDBSteps11\$db
ilDBInterface $db
Definition:
ShortlinksDBSteps11.php:28
ILIAS\StaticURL\Setup\Shortlinks\ShortlinksDBSteps11\step_1
step_1()
Definition:
ShortlinksDBSteps11.php:35
ILIAS\StaticURL\Setup\Shortlinks\ShortlinksDBSteps11\prepare
prepare(\ilDBInterface $db)
Prepare the execution of the steps.
Definition:
ShortlinksDBSteps11.php:30
true
return true
Definition:
class.ilIniFile.php:164
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
ILIAS\StaticURL\Setup\Shortlinks
Definition:
ShortlinksDBSteps11.php:21
components
ILIAS
StaticURL
src
Setup
Shortlinks
ShortlinksDBSteps11.php
Generated on Sat Dec 13 2025 23:03:39 for ILIAS by
1.9.4 (using
Doxyfile
)