ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Poll\Setup\DBUpdateSteps10 Class Reference
+ Inheritance diagram for ILIAS\Poll\Setup\DBUpdateSteps10:
+ Collaboration diagram for ILIAS\Poll\Setup\DBUpdateSteps10:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 
 step_2 ()
 
- Public Member Functions inherited from ilDatabaseUpdateSteps
 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Definition at line 27 of file DBUpdateSteps10.php.

Member Function Documentation

◆ prepare()

ILIAS\Poll\Setup\DBUpdateSteps10::prepare ( ilDBInterface  $db)

Definition at line 31 of file DBUpdateSteps10.php.

References ILIAS\Poll\Setup\DBUpdateSteps10\$db.

31  : void
32  {
33  $this->db = $db;
34  }

◆ step_1()

ILIAS\Poll\Setup\DBUpdateSteps10::step_1 ( )

Definition at line 36 of file DBUpdateSteps10.php.

References ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

36  : 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  }

◆ step_2()

ILIAS\Poll\Setup\DBUpdateSteps10::step_2 ( )

Definition at line 58 of file DBUpdateSteps10.php.

References ilDBConstants\T_INTEGER.

58  : 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  }

Field Documentation

◆ $db

ilDBInterface ILIAS\Poll\Setup\DBUpdateSteps10::$db
protected

Definition at line 29 of file DBUpdateSteps10.php.

Referenced by ILIAS\Poll\Setup\DBUpdateSteps10\prepare().


The documentation for this class was generated from the following file: