ILIAS
trunk Revision v11.0_alpha-2662-g519ff7d528f
◀ ilDoc Overview
DBUpdateSteps10.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Poll\Setup
;
22
23
use
ilDatabaseUpdateSteps
;
24
use
ilDBConstants
;
25
use
ilDBInterface
;
26
27
class
DBUpdateSteps10
implements
ilDatabaseUpdateSteps
28
{
29
protected
ilDBInterface
$db
;
30
31
public
function
prepare
(
ilDBInterface
$db): void
32
{
33
$this->db =
$db
;
34
}
35
36
public
function
step_1
(): void
37
{
38
if
($this->db->tableExists(
"il_poll_image"
)) {
39
return
;
40
}
41
$this->db->createTable(
"il_poll_image"
, [
42
'object_id'
=> [
43
'type'
=>
ilDBConstants::T_INTEGER
,
44
'length'
=> 8,
45
'default'
=> 0,
46
'notnull'
=>
true
47
],
48
'rid'
=> [
49
'type'
=>
ilDBConstants::T_TEXT
,
50
'length'
=> 64,
51
'default'
=>
''
,
52
'notnull'
=>
true
53
]
54
]);
55
$this->db->addPrimaryKey(
"il_poll_image"
, [
"object_id"
]);
56
}
57
58
public
function
step_2
(): void
59
{
60
if
(
61
!$this->db->tableExists(
"il_poll"
) or
62
$this->db->tableColumnExists(
"il_poll"
,
"migrated"
)
63
) {
64
return
;
65
}
66
$this->db->addTableColumn(
"il_poll"
,
"migrated"
, [
67
'type'
=>
ilDBConstants::T_INTEGER
,
68
'length'
=> 4,
69
'default'
=> 0
70
]);
71
}
72
}
ILIAS\Poll\Setup\DBUpdateSteps10\prepare
prepare(ilDBInterface $db)
Definition:
DBUpdateSteps10.php:31
ILIAS\Poll\Setup\DBUpdateSteps10\step_1
step_1()
Definition:
DBUpdateSteps10.php:36
ilDBConstants\T_TEXT
const T_TEXT
Definition:
class.ilDBConstants.php:56
ilDBConstants
ILIAS\Poll\Setup\DBUpdateSteps10
Definition:
DBUpdateSteps10.php:27
ilDBInterface
ilDatabaseUpdateSteps
ILIAS\Poll\Setup\DBUpdateSteps10\$db
ilDBInterface $db
Definition:
DBUpdateSteps10.php:29
ILIAS\Poll\Setup\DBUpdateSteps10\step_2
step_2()
Definition:
DBUpdateSteps10.php:58
ilDBConstants\T_INTEGER
const T_INTEGER
Definition:
class.ilDBConstants.php:55
ILIAS\Poll\Setup
Definition:
DBUpdateSteps10.php:21
components
ILIAS
Poll
classes
Setup
DBUpdateSteps10.php
Generated on Wed Sep 3 2025 23:03:00 for ILIAS by
1.8.13 (using
Doxyfile
)