ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilStudyProgrammeUDFDefinitionUpdateSteps.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 {
23  public const TABLE_NAME = 'udf_definition';
24 
25  protected ilDBInterface $db;
26 
27  public function prepare(ilDBInterface $db): void
28  {
29  $this->db = $db;
30  }
31 
32  public function step_1(): void
33  {
34  $column_name = 'prg_export';
35 
36  if (!$this->db->tableColumnExists(self::TABLE_NAME, $column_name)) {
37  $this->db->addTableColumn(
38  self::TABLE_NAME,
39  $column_name,
40  [
41  'type' => 'integer',
42  'length' => 1,
43  'default' => 0,
44  'notnull' => true
45  ]
46  );
47  }
48  }
49 }