ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
DBUpdateSteps11.php
Go to the documentation of this file.
1 <?php
2 
19 namespace ILIAS\ILIASObject\Setup;
20 
22 {
23  protected \ilDBInterface $db;
24 
25  public function prepare(\ilDBInterface $db): void
26  {
27  $this->db = $db;
28  }
29 
30  public function step_1(): 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  }
55 }
prepare(\ilDBInterface $db)
Prepare the execution of the steps.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Agent.php:19