ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilMediaObjectsDBUpdateSteps.php
Go to the documentation of this file.
1 <?php
2 
19 namespace ILIAS\MediaObjects\Setup;
20 
25 {
26  protected \ilDBInterface $db;
27 
28  public function prepare(\ilDBInterface $db): void
29  {
30  $this->db = $db;
31  }
32 
33  public function step_1(): void
34  {
35  $db = $this->db;
36  if (!$db->tableColumnExists('media_item', 'duration')) {
37  $db->addTableColumn('media_item', 'duration', array(
38  "type" => "integer",
39  "notnull" => true,
40  "length" => 4,
41  "default" => 0
42  ));
43  }
44  }
45 
46  public function step_2(): void
47  {
48  $db = $this->db;
49  $db->modifyTableColumn('map_area', 'coords', ['length' => 4000]);
50  }
51 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
modifyTableColumn(string $table, string $column, array $attributes)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addTableColumn(string $table_name, string $column_name, array $attributes)
prepare(\ilDBInterface $db)
Prepare the execution of the steps.