ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilBadgeDBUpdateSteps.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->tableColumnExists('badge_badge', 'image_rid')) {
33 $this->db->addTableColumn(
34 'badge_badge',
35 'image_rid',
36 [
37 'type' => 'text',
38 'length' => 64,
39 'notnull' => false,
40 'default' => '',
41 ]
42 );
43 }
44 }
45
46 public function step_2(): void
47 {
48 if (!$this->db->tableColumnExists('badge_image_template', 'image_rid')) {
49 $this->db->addTableColumn(
50 'badge_image_template',
51 'image_rid',
52 [
53 'type' => 'text',
54 'length' => 64,
55 'notnull' => false,
56 'default' => '',
57 ]
58 );
59 }
60 }
61}
Interface ilDBInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...