ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilLTIDatabaseUpdateSteps 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 ilLTIDatabaseUpdateSteps:
+ Collaboration diagram for ilLTIDatabaseUpdateSteps:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 
 step_2 ()
 
 step_3 ()
 
 step_4 ()
 
 step_5 ()
 
 step_6 ()
 
 step_7 ()
 
 step_8 ()
 
 step_9 ()
 
- Public Member Functions inherited from ilDatabaseUpdateSteps
 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 

Protected Attributes

ilDBInterface $db
 

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 21 of file class.ilLTIDatabaseUpdateSteps.php.

Member Function Documentation

◆ prepare()

ilLTIDatabaseUpdateSteps::prepare ( ilDBInterface  $db)

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

References $db.

25  : void
26  {
27  $this->db = $db;
28  }

◆ step_1()

ilLTIDatabaseUpdateSteps::step_1 ( )

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

30  : void
31  {
32  if ($this->db->tableColumnExists('lti2_consumer', 'consumer_key')) {
33  $this->db->dropTableColumn('lti2_consumer', 'consumer_key');
34  }
35  }

◆ step_2()

ilLTIDatabaseUpdateSteps::step_2 ( )

Definition at line 37 of file class.ilLTIDatabaseUpdateSteps.php.

37  : void
38  {
39  if ($this->db->tableColumnExists('lti2_consumer', 'consumer_key256')) {
40  $this->db->renameTableColumn('lti2_consumer', 'consumer_key256', 'consumer_key');
41  }
42  }

◆ step_3()

ilLTIDatabaseUpdateSteps::step_3 ( )

Definition at line 44 of file class.ilLTIDatabaseUpdateSteps.php.

44  : void
45  {
46  if ($this->db->tableColumnExists('lti2_consumer', 'consumer_key')) {
47  $this->db->modifyTableColumn('lti2_consumer', 'consumer_key', array(
48  'type' => 'text',
49  'length' => 255,
50  'notnull' => false
51  ));
52  }
53  }

◆ step_4()

ilLTIDatabaseUpdateSteps::step_4 ( )

Definition at line 55 of file class.ilLTIDatabaseUpdateSteps.php.

55  : void
56  {
57  if (!$this->db->tableColumnExists('lti2_consumer', 'platform_id')) {
58  $this->db->addTableColumn('lti2_consumer', 'platform_id', [
59  'type' => 'text',
60  'length' => 255,
61  'notnull' => false
62  ]);
63  }
64  }

◆ step_5()

ilLTIDatabaseUpdateSteps::step_5 ( )

Definition at line 66 of file class.ilLTIDatabaseUpdateSteps.php.

66  : void
67  {
68  if (!$this->db->tableColumnExists('lti2_consumer', 'client_id')) {
69  $this->db->addTableColumn('lti2_consumer', 'client_id', [
70  'type' => 'text',
71  'length' => 255,
72  'notnull' => false
73  ]);
74  }
75  }

◆ step_6()

ilLTIDatabaseUpdateSteps::step_6 ( )

Definition at line 77 of file class.ilLTIDatabaseUpdateSteps.php.

77  : void
78  {
79  if (!$this->db->tableColumnExists('lti2_consumer', 'deployment_id')) {
80  $this->db->addTableColumn('lti2_consumer', 'deployment_id', [
81  'type' => 'text',
82  'length' => 255,
83  'notnull' => false
84  ]);
85  }
86  }

◆ step_7()

ilLTIDatabaseUpdateSteps::step_7 ( )

Definition at line 88 of file class.ilLTIDatabaseUpdateSteps.php.

88  : void
89  {
90  if (!$this->db->tableColumnExists('lti2_consumer', 'public_key')) {
91  $this->db->addTableColumn('lti2_consumer', 'public_key', [
92  'type' => 'clob',
93  'notnull' => false
94  ]);
95  }
96  }

◆ step_8()

ilLTIDatabaseUpdateSteps::step_8 ( )

Definition at line 98 of file class.ilLTIDatabaseUpdateSteps.php.

98  : void
99  {
100  if (!$this->db->tableExists('lti2_access_token')) {
101  $values = array(
102  'consumer_pk' => array(
103  'type' => 'integer',
104  'length' => 4,
105  'notnull' => true
106  ),
107  'scopes' => array(
108  'type' => 'clob',
109  'default' => '',
110  'notnull' => true
111  ),
112  'token' => array(
113  'type' => 'text',
114  'length' => 2000,
115  'default' => '',
116  'notnull' => true
117  ),
118  'expires' => array(
119  'type' => 'timestamp',
120  'notnull' => true
121  ),
122  'created' => array(
123  'type' => 'timestamp',
124  'notnull' => true
125  ),
126  'updated' => array(
127  'type' => 'timestamp',
128  'notnull' => true
129  )
130  );
131  $this->db->createTable("lti2_access_token", $values);
132  $this->db->addPrimaryKey("lti2_access_token", array("consumer_pk"));
133  }
134  }

◆ step_9()

ilLTIDatabaseUpdateSteps::step_9 ( )

Definition at line 136 of file class.ilLTIDatabaseUpdateSteps.php.

136  : void
137  {
138  $this->db->modifyTableColumn("lti2_consumer", "settings", array("type" => "clob", "notnull" => false));
139  }

Field Documentation

◆ $db

ilDBInterface ilLTIDatabaseUpdateSteps::$db
protected

Definition at line 23 of file class.ilLTIDatabaseUpdateSteps.php.

Referenced by prepare().


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