/
addNewFields2SMSqueueTable.php
35 lines (33 loc) · 2.03 KB
/
addNewFields2SMSqueueTable.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/*************************************************************************************************
* Copyright 2022 Spike, JPL TSolucio, S.L. -- This file is a part of TSOLUCIO coreBOS Customizations.
* Licensed under the vtiger CRM Public License Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You can redistribute it and/or modify it
* under the terms of the License. JPL TSolucio, S.L. reserves all rights not expressly
* granted by the License. coreBOS distributed by JPL TSolucio S.L. is distributed in
* the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Unless required by
* applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT ANY WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing
* permissions and limitations under the License. You may obtain a copy of the License
* at <http://corebos.org/documentation/doku.php?id=en:devel:vpl11>
*************************************************************************************************/
class addNewFields2SMSqueueTable extends cbupdaterWorker {
public function applyChange() {
if ($this->hasError()) {
$this->sendError();
}
if ($this->isApplied()) {
$this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
} else {
$this->ExecuteQuery('ALTER TABLE `cb_messagequeue` ADD `deliverstarttime` VARCHAR(10) NULL DEFAULT NULL;');
$this->ExecuteQuery('ALTER TABLE `cb_messagequeue` ADD `deliverendtime` VARCHAR(10) NULL DEFAULT NULL;');
$this->ExecuteQuery('ALTER TABLE `cb_messagequeue` ADD `cansendonsaturday` tinyint NOT NULL DEFAULT 1;');
$this->ExecuteQuery('ALTER TABLE `cb_messagequeue` ADD `cansendonsunday` tinyint NOT NULL DEFAULT 1;');
$this->sendMsg('Changeset ' . get_class($this) . ' applied!');
$this->markApplied(false);
}
$this->finishExecution();
}
}