ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilLearningSequenceRectifyPostConditionsTableDBUpdateSteps Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilLearningSequenceRectifyPostConditionsTableDBUpdateSteps:
+ Collaboration diagram for ilLearningSequenceRectifyPostConditionsTableDBUpdateSteps:

Public Member Functions

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

Protected Attributes

ilDBInterface $db
 

Private Attributes

const TABLE_NAME = "post_conditions"
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

Definition at line 19 of file class.ilLearningSequenceRectifyPostConditionsTableDBUpdateSteps.php.

Member Function Documentation

◆ prepare()

ilLearningSequenceRectifyPostConditionsTableDBUpdateSteps::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 25 of file class.ilLearningSequenceRectifyPostConditionsTableDBUpdateSteps.php.

References $db.

◆ step_1()

ilLearningSequenceRectifyPostConditionsTableDBUpdateSteps::step_1 ( )

Definition at line 30 of file class.ilLearningSequenceRectifyPostConditionsTableDBUpdateSteps.php.

30  : void
31  {
32  $this->db->dropPrimaryKey(self::TABLE_NAME);
33  $this->db->addPrimaryKey(self::TABLE_NAME, ["ref_id"]);
34  }

◆ step_2()

ilLearningSequenceRectifyPostConditionsTableDBUpdateSteps::step_2 ( )

Definition at line 36 of file class.ilLearningSequenceRectifyPostConditionsTableDBUpdateSteps.php.

36  : void
37  {
38  $this->db->modifyTableColumn(
39  self::TABLE_NAME,
40  "value",
41  [
42  "type" => "text",
43  "length" => 255,
44  "notnull" => false
45  ]
46  );
47  }

◆ step_3()

ilLearningSequenceRectifyPostConditionsTableDBUpdateSteps::step_3 ( )

Definition at line 49 of file class.ilLearningSequenceRectifyPostConditionsTableDBUpdateSteps.php.

49  : void
50  {
51  $this->db->manipulate(
52  "UPDATE " . self::TABLE_NAME . " SET value = NULL WHERE value = 0"
53  );
54  }

Field Documentation

◆ $db

ilDBInterface ilLearningSequenceRectifyPostConditionsTableDBUpdateSteps::$db
protected

◆ TABLE_NAME

const ilLearningSequenceRectifyPostConditionsTableDBUpdateSteps::TABLE_NAME = "post_conditions"
private

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