ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.BlogDBUpdateSteps.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Blog\Setup;
22
27{
28 protected \ilDBInterface $db;
29
30 public function prepare(\ilDBInterface $db): void
31 {
32 $this->db = $db;
33 }
34
35 public function step_1(): void
36 {
37 if (!$this->db->tableColumnExists('il_blog', 'act_est_reading_time')) {
38 $this->db->addTableColumn('il_blog', 'act_est_reading_time', array(
39 'type' => 'integer',
40 'notnull' => true,
41 'length' => 1,
42 'default' => 0
43 ));
44 }
45 }
46
47 public function step_2(): void
48 {
49 if (!$this->db->tableColumnExists('page_object', 'est_reading_time')) {
50 $this->db->addTableColumn('page_object', 'est_reading_time', array(
51 'type' => 'integer',
52 'notnull' => true,
53 'length' => 4,
54 'default' => 0
55 ));
56 }
57 }
58}
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...