ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ILIAS\ILIASObject\Setup\DBUpdateSteps11 Class Reference
+ Inheritance diagram for ILIAS\ILIASObject\Setup\DBUpdateSteps11:
+ Collaboration diagram for ILIAS\ILIASObject\Setup\DBUpdateSteps11:

Public Member Functions

 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 
 step_1 ()
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Definition at line 21 of file DBUpdateSteps11.php.

Member Function Documentation

◆ prepare()

ILIAS\ILIASObject\Setup\DBUpdateSteps11::prepare ( \ilDBInterface  $db)

Prepare the execution of the steps.

Do not use anything from the globals or the DIC inside your steps, only use the instance of the database provided here.

Implements ilDatabaseUpdateSteps.

Definition at line 25 of file DBUpdateSteps11.php.

References ILIAS\ILIASObject\Setup\DBUpdateSteps11\$db.

25  : void
26  {
27  $this->db = $db;
28  }

◆ step_1()

ILIAS\ILIASObject\Setup\DBUpdateSteps11::step_1 ( )

Definition at line 30 of file DBUpdateSteps11.php.

References ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

30  : void
31  {
32  if (!$this->db->tableColumnExists('object_translation', 'lang_base')) {
33  $this->db->addTableColumn(
34  'object_translation',
35  'lang_base',
36  [
37  'type' => \ilDBConstants::T_INTEGER,
38  'notnull' => true,
39  'length' => 1,
40  'default' => 0
41  ]
42  );
43  }
44 
45  $this->db->modifyTableColumn(
46  'object_translation',
47  'lang_code',
48  [
49  'type' => \ilDBConstants::T_TEXT,
50  'notnull' => true,
51  'length' => 64
52  ]
53  );
54  }

Field Documentation

◆ $db

ilDBInterface ILIAS\ILIASObject\Setup\DBUpdateSteps11::$db
protected

Definition at line 23 of file DBUpdateSteps11.php.

Referenced by ILIAS\ILIASObject\Setup\DBUpdateSteps11\prepare().


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