ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilWebResourceDBUpdateSteps Class Reference

General purpose update steps for weblinks. More...

+ Inheritance diagram for ilWebResourceDBUpdateSteps:
+ Collaboration diagram for ilWebResourceDBUpdateSteps:

Public Member Functions

 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 
 step_1 ()
 
 step_2 ()
 Increases the maximum length of object import-ids from 50 to 255 characters. More...
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

General purpose update steps for weblinks.

Author
Tim Schmitz schmi.nosp@m.tz@l.nosp@m.eifos.nosp@m..de

Definition at line 25 of file class.ilWebResourceDBUpdateSteps.php.

Member Function Documentation

◆ prepare()

ilWebResourceDBUpdateSteps::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 29 of file class.ilWebResourceDBUpdateSteps.php.

References $db.

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

◆ step_1()

ilWebResourceDBUpdateSteps::step_1 ( )

Definition at line 34 of file class.ilWebResourceDBUpdateSteps.php.

34  : void
35  {
36  // Add index
37  if (!$this->db->indexExistsByFields('webr_items', ['webr_id'])) {
38  $this->db->addIndex('webr_items', ['webr_id'], 'i3');
39  }
40  }

◆ step_2()

ilWebResourceDBUpdateSteps::step_2 ( )

Increases the maximum length of object import-ids from 50 to 255 characters.

Definition at line 45 of file class.ilWebResourceDBUpdateSteps.php.

References ilDBConstants\T_TEXT.

45  : void
46  {
47  $this->db->modifyTableColumn("object_data", "import_id", [
48  "type" => \ilDBConstants::T_TEXT,
49  "length" => 255,
50  "notnull" => false
51  ]);
52  }

Field Documentation

◆ $db

ilDBInterface ilWebResourceDBUpdateSteps::$db
protected

Definition at line 27 of file class.ilWebResourceDBUpdateSteps.php.

Referenced by prepare().


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