ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
DBHTMLExportUpdateSteps.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
28{
29 protected ilDBInterface $db;
30
31 public function prepare(ilDBInterface $db): void
32 {
33 $this->db = $db;
34 }
35
39 public function step_1(): void
40 {
41 if (!$this->db->tableExists("export_files_html")) {
42 $this->db->createTable("export_files_html", [
43 'object_id' => [
44 'type' => 'integer',
45 'length' => 8,
46 'default' => 0,
47 'notnull' => true
48 ],
49 'rid' => [
50 'type' => 'text',
51 'length' => 64,
52 'default' => '',
53 'notnull' => true
54 ],
55 'timestamp' => [
56 'type' => 'timestamp',
57 'notnull' => false
58 ],
59 'type' => [
60 'type' => 'text',
61 'length' => 10,
62 'default' => '',
63 'notnull' => true
64 ],
65 ]);
66 $this->db->addPrimaryKey("export_files_html", ["object_id", "rid"]);
67 }
68 }
69
70 public function step_2(): void
71 {
72 }
73
74 public function step_3(): void
75 {
76 }
77
78 public function step_4(): void
79 {
80 $this->db->modifyTableColumn("export_files_html", "type", [
81 'type' => 'text',
82 'length' => 40,
83 'default' => '',
84 'notnull' => true
85 ]);
86 }
87}
Class ilDBConstants.
Interface ilDBInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...