ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilIntroduceComponentArtifactDBUpdateSteps Class Reference
+ Inheritance diagram for ilIntroduceComponentArtifactDBUpdateSteps:
+ Collaboration diagram for ilIntroduceComponentArtifactDBUpdateSteps:

Public Member Functions

 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 
 step_1 ()
 
 step_2 ()
 
 step_3 ()
 
 step_4 ()
 
 step_5 ()
 
 step_6 ()
 
 step_7 ()
 
 step_8 ()
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Member Function Documentation

◆ prepare()

ilIntroduceComponentArtifactDBUpdateSteps::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.ilIntroduceComponentArtifactDBUpdateSteps.php.

References $db.

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

◆ step_1()

ilIntroduceComponentArtifactDBUpdateSteps::step_1 ( )

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

33  : void
34  {
35  if ($this->db->tableExists("il_compoment")) {
36  $this->db->dropTable("il_component");
37  }
38  }

◆ step_2()

ilIntroduceComponentArtifactDBUpdateSteps::step_2 ( )

Definition at line 40 of file class.ilIntroduceComponentArtifactDBUpdateSteps.php.

40  : void
41  {
42  $this->db->dropTable("il_pluginslot");
43  }

◆ step_3()

ilIntroduceComponentArtifactDBUpdateSteps::step_3 ( )

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

45  : void
46  {
47  $this->db->manipulate("DELETE FROM il_plugin WHERE plugin_id IS NULL");
48  }

◆ step_4()

ilIntroduceComponentArtifactDBUpdateSteps::step_4 ( )

Definition at line 50 of file class.ilIntroduceComponentArtifactDBUpdateSteps.php.

References Vendor\Package\$e.

50  : void
51  {
52  try {
53  $this->db->addPrimaryKey("il_plugin", ["plugin_id"]);
54  } catch (\PDOException $e) {
55  $this->db->dropPrimaryKey("il_plugin");
56  $this->db->addPrimaryKey("il_plugin", ["plugin_id"]);
57  }
58  }

◆ step_5()

ilIntroduceComponentArtifactDBUpdateSteps::step_5 ( )

Definition at line 60 of file class.ilIntroduceComponentArtifactDBUpdateSteps.php.

60  : void
61  {
62  if (!$this->db->tableColumnExists("il_plugin", "component_type")) {
63  return;
64  }
65 
66  $this->db->dropTableColumn("il_plugin", "component_type");
67  }

◆ step_6()

ilIntroduceComponentArtifactDBUpdateSteps::step_6 ( )

Definition at line 69 of file class.ilIntroduceComponentArtifactDBUpdateSteps.php.

69  : void
70  {
71  if (!$this->db->tableColumnExists("il_plugin", "component_name")) {
72  return;
73  }
74 
75  $this->db->dropTableColumn("il_plugin", "component_name");
76  }

◆ step_7()

ilIntroduceComponentArtifactDBUpdateSteps::step_7 ( )

Definition at line 78 of file class.ilIntroduceComponentArtifactDBUpdateSteps.php.

78  : void
79  {
80  if (!$this->db->tableColumnExists("il_plugin", "slot_id")) {
81  return;
82  }
83 
84  $this->db->dropTableColumn("il_plugin", "slot_id");
85  }

◆ step_8()

ilIntroduceComponentArtifactDBUpdateSteps::step_8 ( )

Definition at line 87 of file class.ilIntroduceComponentArtifactDBUpdateSteps.php.

87  : void
88  {
89  if (!$this->db->tableColumnExists("il_plugin", "name")) {
90  return;
91  }
92 
93  $this->db->dropTableColumn("il_plugin", "name");
94  }

Field Documentation

◆ $db

ilDBInterface ilIntroduceComponentArtifactDBUpdateSteps::$db
protected

Definition at line 26 of file class.ilIntroduceComponentArtifactDBUpdateSteps.php.

Referenced by prepare().


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