Some more changes
This commit is contained in:
parent
311697693f
commit
62d9f31d14
@ -29,8 +29,8 @@ if (hesk_dbNumRows($tableSql) > 0) {
|
|||||||
$migration_map = array(
|
$migration_map = array(
|
||||||
// Pre-1.4.0 to 1.5.0 did not have a settings table
|
// Pre-1.4.0 to 1.5.0 did not have a settings table
|
||||||
'1.6.0' => 22, '1.6.1' => 23, '1.7.0' => 27, '2.0.0' => 37, '2.0.1' => 38, '2.1.0' => 39, '2.1.1' => 42,
|
'1.6.0' => 22, '1.6.1' => 23, '1.7.0' => 27, '2.0.0' => 37, '2.0.1' => 38, '2.1.0' => 39, '2.1.1' => 42,
|
||||||
'2.2.0' => 47, '2.2.1' => 48, '2.3.0' => 68, '2.3.1' => 69, '2.3.2' => 70, /*TODO */ '2.4.0' => 48, '2.4.1' => 49,
|
'2.2.0' => 47, '2.2.1' => 48, '2.3.0' => 68, '2.3.1' => 69, '2.3.2' => 70, '2.4.0' => 86, '2.4.1' => 87,
|
||||||
'2.4.2' => 50, '2.5.0' => 54, '2.5.1' => 55, '2.5.2' => 56, '2.5.3' => 57, '2.5.4' => 58, '2.5.5' => 59,
|
'2.4.2' => 88, /*TODO*/ '2.5.0' => 54, '2.5.1' => 55, '2.5.2' => 56, '2.5.3' => 57, '2.5.4' => 58, '2.5.5' => 59,
|
||||||
'2.6.0' => 66, '2.6.1' => 67, '2.6.2' => 69, '2.6.3' => 70, '2.6.4' => 71, '3.0.0' => 75, '3.0.1' => 76,
|
'2.6.0' => 66, '2.6.1' => 67, '2.6.2' => 69, '2.6.3' => 70, '2.6.4' => 71, '3.0.0' => 75, '3.0.1' => 76,
|
||||||
'3.0.2' => 78, '3.0.3' => 79, '3.0.4' => 80, '3.0.5' => 81, '3.0.6' => 82, '3.0.7' => 83, '3.1.0' => 90,
|
'3.0.2' => 78, '3.0.3' => 79, '3.0.4' => 80, '3.0.5' => 81, '3.0.6' => 82, '3.0.7' => 83, '3.1.0' => 90,
|
||||||
'3.1.1' => 91
|
'3.1.1' => 91
|
||||||
|
@ -103,17 +103,28 @@ function getAllMigrations() {
|
|||||||
//2.3.2
|
//2.3.2
|
||||||
69 => new LegacyUpdateMigration('2.3.2', '2.3.1'),
|
69 => new LegacyUpdateMigration('2.3.2', '2.3.1'),
|
||||||
//2.4.0
|
//2.4.0
|
||||||
70 => new \v240\CreateQuickHelpSectionsTable(),
|
70 => new \v240\CreateQuickHelpSections\CreateTable(),
|
||||||
// TODO
|
71 => new \v240\CreateQuickHelpSections\InsertCreateTicketRecord(),
|
||||||
45 => new \v240\CreateNewStatusNameTable(),
|
72 => new \v240\CreateQuickHelpSections\InsertKnowledgebaseRecord(),
|
||||||
46 => new \v240\AddDownloadCountToAttachments(),
|
73 => new \v240\CreateQuickHelpSections\InsertStaffCreateTicketRecord(),
|
||||||
47 => new \v240\AddHtmlColumnToTickets(),
|
74 => new \v240\CreateQuickHelpSections\InsertViewTicketFormRecord(),
|
||||||
48 => new LegacyUpdateMigration('2.4.0', '2.3.2'),
|
75 => new \v240\CreateQuickHelpSections\InsertViewTicketRecord(),
|
||||||
|
76 => new \v240\CreateNewStatusNameTable\CreateTextToStatusXrefTable(),
|
||||||
|
77 => new \v240\CreateNewStatusNameTable\AddSortColumnToStatuses(),
|
||||||
|
78 => new \v240\CreateNewStatusNameTable\UpdateSortValues(),
|
||||||
|
79 => new \v240\CreateNewStatusNameTable\InsertTextToStatusXrefValues(),
|
||||||
|
80 => new \v240\AddDownloadCountToAttachments\AddToAttachmentsTable(),
|
||||||
|
81 => new \v240\AddDownloadCountToAttachments\AddToKBAttachmentsTable(),
|
||||||
|
82 => new \v240\AddHtmlColumnToTickets\UpdateTicketsTable(),
|
||||||
|
83 => new \v240\AddHtmlColumnToTickets\UpdateStageTicketsTable(),
|
||||||
|
84 => new \v240\AddHtmlColumnToTickets\UpdateRepliesTable(),
|
||||||
|
85 => new LegacyUpdateMigration('2.4.0', '2.3.2'),
|
||||||
//2.4.1
|
//2.4.1
|
||||||
49 => new LegacyUpdateMigration('2.4.1', '2.4.0'),
|
86 => new LegacyUpdateMigration('2.4.1', '2.4.0'),
|
||||||
//2.4.2
|
//2.4.2
|
||||||
50 => new LegacyUpdateMigration('2.4.2', '2.4.1'),
|
87 => new LegacyUpdateMigration('2.4.2', '2.4.1'),
|
||||||
//2.5.0
|
//2.5.0
|
||||||
|
// TODO
|
||||||
51 => new \v250\MigrateSettingsToDatabase(),
|
51 => new \v250\MigrateSettingsToDatabase(),
|
||||||
52 => new \v250\AddUserAgentAndScreenResToTickets(),
|
52 => new \v250\AddUserAgentAndScreenResToTickets(),
|
||||||
53 => new \v250\AddNavbarTitleUrl(),
|
53 => new \v250\AddNavbarTitleUrl(),
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace v240\AddDownloadCountToAttachments;
|
||||||
|
|
||||||
|
|
||||||
|
class AddToAttachmentsTable extends \AbstractMigration {
|
||||||
|
|
||||||
|
function up($hesk_settings) {
|
||||||
|
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "attachments` ADD COLUMN `download_count` INT NOT NULL DEFAULT 0");
|
||||||
|
}
|
||||||
|
|
||||||
|
function down($hesk_settings) {
|
||||||
|
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "attachments` DROP COLUMN `download_count`");
|
||||||
|
}
|
||||||
|
}
|
@ -1,17 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace v240;
|
namespace v240\AddDownloadCountToAttachments;
|
||||||
|
|
||||||
|
|
||||||
class AddDownloadCountToAttachments extends \AbstractMigration {
|
class AddToKBAttachmentsTable extends \AbstractMigration {
|
||||||
|
|
||||||
function up($hesk_settings) {
|
function up($hesk_settings) {
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "attachments` ADD COLUMN `download_count` INT NOT NULL DEFAULT 0");
|
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "kb_attachments` ADD COLUMN `download_count` INT NOT NULL DEFAULT 0");
|
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "kb_attachments` ADD COLUMN `download_count` INT NOT NULL DEFAULT 0");
|
||||||
}
|
}
|
||||||
|
|
||||||
function down($hesk_settings) {
|
function down($hesk_settings) {
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "attachments` DROP COLUMN `download_count`");
|
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "kb_attachments` DROP COLUMN `download_count`");
|
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "kb_attachments` DROP COLUMN `download_count`");
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,19 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace v240;
|
|
||||||
|
|
||||||
|
|
||||||
class AddHtmlColumnToTickets extends \AbstractMigration {
|
|
||||||
|
|
||||||
function up($hesk_settings) {
|
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` ADD COLUMN `html` ENUM('0','1') NOT NULL DEFAULT '0'");
|
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "stage_tickets` ADD COLUMN `html` ENUM('0','1') NOT NULL DEFAULT '0'");
|
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "replies` ADD COLUMN `html` ENUM('0','1') NOT NULL DEFAULT '0'");
|
|
||||||
}
|
|
||||||
|
|
||||||
function down($hesk_settings) {
|
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` DROP COLUMN `html`");
|
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "stage_tickets` DROP COLUMN `html`");
|
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "replies` DROP COLUMN `html`");
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace v240\AddHtmlColumnToTickets;
|
||||||
|
|
||||||
|
|
||||||
|
class UpdateRepliesTable extends \AbstractMigration {
|
||||||
|
|
||||||
|
function up($hesk_settings) {
|
||||||
|
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "replies` ADD COLUMN `html` ENUM('0','1') NOT NULL DEFAULT '0'");
|
||||||
|
}
|
||||||
|
|
||||||
|
function down($hesk_settings) {
|
||||||
|
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "replies` DROP COLUMN `html`");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace v240\AddHtmlColumnToTickets;
|
||||||
|
|
||||||
|
|
||||||
|
class UpdateStageTicketsTable extends \AbstractMigration {
|
||||||
|
|
||||||
|
function up($hesk_settings) {
|
||||||
|
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "stage_tickets` ADD COLUMN `html` ENUM('0','1') NOT NULL DEFAULT '0'");
|
||||||
|
}
|
||||||
|
|
||||||
|
function down($hesk_settings) {
|
||||||
|
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "stage_tickets` DROP COLUMN `html`");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace v240\AddHtmlColumnToTickets;
|
||||||
|
|
||||||
|
|
||||||
|
class UpdateTicketsTable extends \AbstractMigration {
|
||||||
|
|
||||||
|
function up($hesk_settings) {
|
||||||
|
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` ADD COLUMN `html` ENUM('0','1') NOT NULL DEFAULT '0'");
|
||||||
|
}
|
||||||
|
|
||||||
|
function down($hesk_settings) {
|
||||||
|
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` DROP COLUMN `html`");
|
||||||
|
}
|
||||||
|
}
|
@ -1,49 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace v240;
|
|
||||||
|
|
||||||
|
|
||||||
class CreateNewStatusNameTable extends \AbstractMigration {
|
|
||||||
|
|
||||||
function up($hesk_settings) {
|
|
||||||
global $hesklang;
|
|
||||||
|
|
||||||
$this->executeQuery("CREATE TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "text_to_status_xref` (
|
|
||||||
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
|
||||||
`language` VARCHAR(200) NOT NULL,
|
|
||||||
`text` VARCHAR(200) NOT NULL,
|
|
||||||
`status_id` INT NOT NULL) ENGINE = MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci");
|
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` ADD COLUMN `sort` INT");
|
|
||||||
$statusesRs = $this->executeQuery("SELECT `ID` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` ORDER BY `ID` ASC");
|
|
||||||
$i = 10;
|
|
||||||
while ($myStatus = hesk_dbFetchAssoc($statusesRs)) {
|
|
||||||
$this->executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` SET `sort`=" . intval($i) . "
|
|
||||||
WHERE `id`='" . intval($myStatus['ID']) . "' LIMIT 1");
|
|
||||||
$i += 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
$languages = array();
|
|
||||||
foreach ($hesk_settings['languages'] as $key => $value) {
|
|
||||||
$languages[$key] = $hesk_settings['languages'][$key]['folder'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$statusesRs = $this->executeQuery("SELECT `ID`, `Key` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses`");
|
|
||||||
$oldSetting = $hesk_settings['can_sel_lang'];
|
|
||||||
$hesk_settings['can_sel_lang'] = 1;
|
|
||||||
while ($row = hesk_dbFetchAssoc($statusesRs)) {
|
|
||||||
foreach ($languages as $language => $languageCode) {
|
|
||||||
hesk_setLanguage($language);
|
|
||||||
$sql = "INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "text_to_status_xref` (`language`, `text`, `status_id`)
|
|
||||||
VALUES ('" . hesk_dbEscape($language) . "', '" . hesk_dbEscape($hesklang[$row['Key']]) . "', " . intval($row['ID']) . ")";
|
|
||||||
$this->executeQuery($sql);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$hesk_settings['can_sel_lang'] = $oldSetting;
|
|
||||||
hesk_resetLanguage();
|
|
||||||
}
|
|
||||||
|
|
||||||
function down($hesk_settings) {
|
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` DROP COLUMN `sort`");
|
|
||||||
$this->executeQuery("DROP TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "text_to_status_xref`");
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace v240\CreateNewStatusNameTable;
|
||||||
|
|
||||||
|
|
||||||
|
class AddSortColumnToStatuses extends \AbstractMigration {
|
||||||
|
|
||||||
|
function up($hesk_settings) {
|
||||||
|
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` ADD COLUMN `sort` INT");
|
||||||
|
}
|
||||||
|
|
||||||
|
function down($hesk_settings) {
|
||||||
|
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` DROP COLUMN `sort`");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace v240\CreateNewStatusNameTable;
|
||||||
|
|
||||||
|
|
||||||
|
class CreateTextToStatusXrefTable extends \AbstractMigration {
|
||||||
|
|
||||||
|
function up($hesk_settings) {
|
||||||
|
$this->executeQuery("CREATE TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "text_to_status_xref` (
|
||||||
|
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
`language` VARCHAR(200) NOT NULL,
|
||||||
|
`text` VARCHAR(200) NOT NULL,
|
||||||
|
`status_id` INT NOT NULL) ENGINE = MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci");
|
||||||
|
}
|
||||||
|
|
||||||
|
function down($hesk_settings) {
|
||||||
|
$this->executeQuery("DROP TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "text_to_status_xref`");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace v240\CreateNewStatusNameTable;
|
||||||
|
|
||||||
|
|
||||||
|
class InsertTextToStatusXrefValues extends \AbstractMigration {
|
||||||
|
|
||||||
|
function up($hesk_settings) {
|
||||||
|
global $hesklang;
|
||||||
|
|
||||||
|
$languages = array();
|
||||||
|
foreach ($hesk_settings['languages'] as $key => $value) {
|
||||||
|
$languages[$key] = $hesk_settings['languages'][$key]['folder'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$statusesRs = $this->executeQuery("SELECT `ID`, `Key` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses`");
|
||||||
|
$oldSetting = $hesk_settings['can_sel_lang'];
|
||||||
|
$hesk_settings['can_sel_lang'] = 1;
|
||||||
|
while ($row = hesk_dbFetchAssoc($statusesRs)) {
|
||||||
|
foreach ($languages as $language => $languageCode) {
|
||||||
|
hesk_setLanguage($language);
|
||||||
|
$sql = "INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "text_to_status_xref` (`language`, `text`, `status_id`)
|
||||||
|
VALUES ('" . hesk_dbEscape($language) . "', '" . hesk_dbEscape($hesklang[$row['Key']]) . "', " . intval($row['ID']) . ")";
|
||||||
|
$this->executeQuery($sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$hesk_settings['can_sel_lang'] = $oldSetting;
|
||||||
|
hesk_resetLanguage();
|
||||||
|
}
|
||||||
|
|
||||||
|
function down($hesk_settings) {
|
||||||
|
$this->executeQuery("DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "text_to_status_xref`");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace v240\CreateNewStatusNameTable;
|
||||||
|
|
||||||
|
|
||||||
|
class UpdateSortValues extends \AbstractMigration {
|
||||||
|
|
||||||
|
function up($hesk_settings) {
|
||||||
|
$statusesRs = $this->executeQuery("SELECT `ID` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` ORDER BY `ID` ASC");
|
||||||
|
$i = 10;
|
||||||
|
while ($myStatus = hesk_dbFetchAssoc($statusesRs)) {
|
||||||
|
$this->executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses` SET `sort`=" . intval($i) . "
|
||||||
|
WHERE `id`='" . intval($myStatus['ID']) . "' LIMIT 1");
|
||||||
|
$i += 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function down($hesk_settings) {
|
||||||
|
}
|
||||||
|
}
|
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace v240;
|
namespace v240\CreateQuickHelpSections;
|
||||||
|
|
||||||
|
|
||||||
class CreateQuickHelpSectionsTable extends \AbstractMigration {
|
class CreateTable extends \AbstractMigration {
|
||||||
|
|
||||||
function up($hesk_settings) {
|
function up($hesk_settings) {
|
||||||
$this->executeQuery("CREATE TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "quick_help_sections` (
|
$this->executeQuery("CREATE TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "quick_help_sections` (
|
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace v240\CreateQuickHelpSections;
|
||||||
|
|
||||||
|
|
||||||
|
class InsertCreateTicketRecord extends \AbstractMigration {
|
||||||
|
|
||||||
|
function up($hesk_settings) {
|
||||||
|
$this->executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "quick_help_sections` (`location`, `show`)
|
||||||
|
VALUES ('create_ticket', '1')");
|
||||||
|
}
|
||||||
|
|
||||||
|
function down($hesk_settings) {
|
||||||
|
$this->executeQuery("DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "quick_help_sections`
|
||||||
|
WHERE `location` = 'create_ticket'");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace v240\CreateQuickHelpSections;
|
||||||
|
|
||||||
|
|
||||||
|
class InsertKnowledgebaseRecord extends \AbstractMigration {
|
||||||
|
|
||||||
|
function up($hesk_settings) {
|
||||||
|
$this->executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "quick_help_sections` (`location`, `show`)
|
||||||
|
VALUES ('knowledgebase', '1')");
|
||||||
|
}
|
||||||
|
|
||||||
|
function down($hesk_settings) {
|
||||||
|
$this->executeQuery("DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "quick_help_sections`
|
||||||
|
WHERE `location` = 'knowledgebase'");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace v240\CreateQuickHelpSections;
|
||||||
|
|
||||||
|
|
||||||
|
class InsertStaffCreateTicketRecord extends \AbstractMigration {
|
||||||
|
|
||||||
|
function up($hesk_settings) {
|
||||||
|
$this->executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "quick_help_sections` (`location`, `show`)
|
||||||
|
VALUES ('staff_create_ticket', '1')");
|
||||||
|
}
|
||||||
|
|
||||||
|
function down($hesk_settings) {
|
||||||
|
$this->executeQuery("DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "quick_help_sections`
|
||||||
|
WHERE `location` = 'staff_create_ticket'");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace v240\CreateQuickHelpSections;
|
||||||
|
|
||||||
|
|
||||||
|
class InsertViewTicketFormRecord extends \AbstractMigration {
|
||||||
|
|
||||||
|
function up($hesk_settings) {
|
||||||
|
$this->executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "quick_help_sections` (`location`, `show`)
|
||||||
|
VALUES ('view_ticket_form', '1')");
|
||||||
|
}
|
||||||
|
|
||||||
|
function down($hesk_settings) {
|
||||||
|
$this->executeQuery("DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "quick_help_sections`
|
||||||
|
WHERE `location` = 'view_ticket_form'");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace v240\CreateQuickHelpSections;
|
||||||
|
|
||||||
|
|
||||||
|
class InsertViewTicketRecord extends \AbstractMigration {
|
||||||
|
|
||||||
|
function up($hesk_settings) {
|
||||||
|
$this->executeQuery("INSERT INTO `" . hesk_dbEscape($hesk_settings['db_pfix']) . "quick_help_sections` (`location`, `show`)
|
||||||
|
VALUES ('view_ticket', '1')");
|
||||||
|
}
|
||||||
|
|
||||||
|
function down($hesk_settings) {
|
||||||
|
$this->executeQuery("DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "quick_help_sections`
|
||||||
|
WHERE `location` = 'view_ticket'");
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user