ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
MailDBUpdateSteps11.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
36 public function step_1(): void
37 {
38 $this->db->update(
39 'mail_obj_data',
40 ['title' => [ilDBConstants::T_TEXT, 'f_sent']],
41 ['m_type' => [ilDBConstants::T_TEXT, 'sent'], 'title' => [ilDBConstants::T_TEXT, 'e_sent']]
42 );
43 }
44
45 public function step_2(): void
46 {
47 if (!$this->db->tableColumnExists('mail', 'schedule_datetime')) {
48 $this->db->addTableColumn(
49 'mail',
50 'schedule_datetime',
51 [
53 'notnull' => false,
54 'default' => null,
55 ]
56 );
57 }
58 if (!$this->db->tableColumnExists('mail', 'schedule_timezone')) {
59 $this->db->addTableColumn(
60 'mail',
61 'schedule_timezone',
62 [
63 'type' => ilDBConstants::T_TEXT,
64 'length' => 32,
65 'notnull' => false,
66 'default' => null
67 ]
68 );
69 }
70 }
71}
Class ilDBConstants.
Interface ilDBInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...