ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.BlogDBUpdateSteps.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
21 namespace 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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: class.Agent.php:21