ILIAS  release_8 Revision v8.24
class.ilMDCopyrightUpdateSteps.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
33 public function step_1(): void
34 {
35 if (!$this->db->tableColumnExists('il_md_cpr_selections', 'full_name')) {
36 $this->db->addTableColumn(
37 'il_md_cpr_selections',
38 'full_name',
39 ['type' => ilDBConstants::T_CLOB]
40 );
41 }
42 }
43
47 public function step_2(): void
48 {
49 if (!$this->db->tableColumnExists('il_md_cpr_selections', 'link')) {
50 $this->db->addTableColumn(
51 'il_md_cpr_selections',
52 'link',
53 ['type' => ilDBConstants::T_CLOB]
54 );
55 }
56 }
57
61 public function step_3(): void
62 {
63 if (!$this->db->tableColumnExists('il_md_cpr_selections', 'image_link')) {
64 $this->db->addTableColumn(
65 'il_md_cpr_selections',
66 'image_link',
67 ['type' => ilDBConstants::T_CLOB]
68 );
69 }
70 }
71
75 public function step_4(): void
76 {
77 if (!$this->db->tableColumnExists('il_md_cpr_selections', 'alt_text')) {
78 $this->db->addTableColumn(
79 'il_md_cpr_selections',
80 'alt_text',
81 ['type' => ilDBConstants::T_CLOB]
82 );
83 }
84 }
85
89 public function step_5(): void
90 {
91 if (!$this->db->tableColumnExists('il_md_cpr_selections', 'migrated')) {
92 $this->db->addTableColumn(
93 'il_md_cpr_selections',
94 'migrated',
95 [
97 'length' => 4,
98 'default' => 0
99 ]
100 );
101 }
102 }
103}
step_3()
Add a column to il_md_cpr_selections for the link to the licence's image.
step_5()
Add a column to il_md_cpr_selections to track which licences have been migrated.
step_4()
Add a column to il_md_cpr_selections for the alt text of the licence's image.
prepare(\ilDBInterface $db)
Prepare the execution of the steps.
step_2()
Add a column to il_md_cpr_selections for the link to the licence.
step_1()
Add a column to il_md_cpr_selections for the full name of the licence.
Interface ilDBInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...