ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilWebResourceDropValidSteps.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
28{
29 protected \ilDBInterface $db;
30
31 public function prepare(\ilDBInterface $db): void
32 {
33 $this->db = $db;
34 }
35 public function step_1(): void
36 {
37 //Drops the column 'disable_check' from webr_items
38 if ($this->db->tableColumnExists('webr_items', 'disable_check')) {
39 $this->db->dropTableColumn('webr_items', 'disable_check');
40 }
41 }
42
43 public function step_2(): void
44 {
45 //Drops the column 'last_check' from webr_items
46 if ($this->db->tableColumnExists('webr_items', 'last_check')) {
47 $this->db->dropTableColumn('webr_items', 'last_check');
48 }
49 }
50
51 public function step_3(): void
52 {
53 //Drops the column 'valid' from webr_items
54 if ($this->db->tableColumnExists('webr_items', 'valid')) {
55 $this->db->dropTableColumn('webr_items', 'valid');
56 }
57 }
58
59 public function step_4(): void
60 {
61 // Removes entries from table webr_params where 'value' is 2.
62 // This removes all link session_id link parameters
63 if ($this->db->tableExists('webr_params')) {
64 $this->db->manipulate("DELETE FROM webr_params WHERE value = " . $this->db->quote(2, 'integer'));
65 }
66 }
67}
These update steps drop the columns 'disable_check', 'last_check' and 'valid' from the table 'webr_it...
prepare(\ilDBInterface $db)
Prepare the execution of the steps.
Interface ilDBInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...