ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\MediaObjects\Setup\ilMediaObjectsDBUpdateSteps Class Reference
+ Inheritance diagram for ILIAS\MediaObjects\Setup\ilMediaObjectsDBUpdateSteps:
+ Collaboration diagram for ILIAS\MediaObjects\Setup\ilMediaObjectsDBUpdateSteps:

Public Member Functions

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

Protected Attributes

ilDBInterface $db
 

Detailed Description

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 24 of file class.ilMediaObjectsDBUpdateSteps.php.

Member Function Documentation

◆ prepare()

ILIAS\MediaObjects\Setup\ilMediaObjectsDBUpdateSteps::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 28 of file class.ilMediaObjectsDBUpdateSteps.php.

References ILIAS\MediaObjects\Setup\ilMediaObjectsDBUpdateSteps\$db.

28  : void
29  {
30  $this->db = $db;
31  }

◆ step_1()

ILIAS\MediaObjects\Setup\ilMediaObjectsDBUpdateSteps::step_1 ( )

Definition at line 33 of file class.ilMediaObjectsDBUpdateSteps.php.

References ILIAS\MediaObjects\Setup\ilMediaObjectsDBUpdateSteps\$db, and ilDBInterface\addTableColumn().

33  : 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  }
tableColumnExists(string $table_name, string $column_name)
addTableColumn(string $table_name, string $column_name, array $attributes)
+ Here is the call graph for this function:

◆ step_2()

ILIAS\MediaObjects\Setup\ilMediaObjectsDBUpdateSteps::step_2 ( )

Definition at line 46 of file class.ilMediaObjectsDBUpdateSteps.php.

References ILIAS\MediaObjects\Setup\ilMediaObjectsDBUpdateSteps\$db, and ilDBInterface\modifyTableColumn().

46  : void
47  {
48  $db = $this->db;
49  $db->modifyTableColumn('map_area', 'coords', ['length' => 4000]);
50  }
modifyTableColumn(string $table, string $column, array $attributes)
+ Here is the call graph for this function:

Field Documentation

◆ $db


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