ILIAS  release_8 Revision v8.24
class.ilForumDatabaseUpdateSteps.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 protected ilDBInterface $db;
24
25 public function prepare(ilDBInterface $db): void
26 {
27 $this->db = $db;
28 }
29
30 public function step_1(): void
31 {
32 if ($this->db->tableExists('frm_settings') && !$this->db->tableColumnExists('frm_settings', 'stylesheet')) {
33 $this->db->addTableColumn(
34 'frm_settings',
35 'stylesheet',
36 [
37 'type' => 'integer',
38 'notnull' => true,
39 'length' => 4,
40 'default' => 0
41 ]
42 );
43 }
44 }
45
46 public function step_2(): void
47 {
48 $this->db->manipulateF("UPDATE object_data SET offline = %s WHERE type = %s", ['integer', 'text'], [0, 'frm']);
49 }
50}
Interface ilDBInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...