Deactivated some migrations as they're no longer needed.... might break some new installs
This commit is contained in:
parent
5865cb722d
commit
90dc2d691a
@ -7,10 +7,12 @@ use AbstractMigration;
|
|||||||
class AddIntColumnUpDropTableDown extends AbstractMigration {
|
class AddIntColumnUpDropTableDown extends AbstractMigration {
|
||||||
|
|
||||||
function up($hesk_settings) {
|
function up($hesk_settings) {
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` ADD COLUMN `status_int` INT NOT NULL DEFAULT 0 AFTER `status`;");
|
// We no longer need to do this thanks to HESK 2.7.0
|
||||||
|
//$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` ADD COLUMN `status_int` INT NOT NULL DEFAULT 0 AFTER `status`;");
|
||||||
}
|
}
|
||||||
|
|
||||||
function down($hesk_settings) {
|
function down($hesk_settings) {
|
||||||
$this->executeQuery("DROP TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses`");
|
// Moved to migration #2 for clarity
|
||||||
|
//$this->executeQuery("DROP TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses`");
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -23,6 +23,9 @@ class CreateStatusesTable extends \AbstractMigration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function down($hesk_settings) {
|
function down($hesk_settings) {
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` ADD COLUMN `status_int` INT NOT NULL AFTER `status`;");
|
// We no longer need to do this thanks to HESK 2.7.0
|
||||||
|
//$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` ADD COLUMN `status_int` INT NOT NULL AFTER `status`;");
|
||||||
|
// Moved from migration #1
|
||||||
|
$this->executeQuery("DROP TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses`");
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,14 +8,16 @@ use AbstractMigration;
|
|||||||
class DropOldStatusColumn extends AbstractMigration {
|
class DropOldStatusColumn extends AbstractMigration {
|
||||||
|
|
||||||
function up($hesk_settings) {
|
function up($hesk_settings) {
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` DROP COLUMN `status`");
|
// We no longer need to do this thanks to HESK 2.7.0
|
||||||
|
//$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` DROP COLUMN `status`");
|
||||||
}
|
}
|
||||||
|
|
||||||
function down($hesk_settings) {
|
function down($hesk_settings) {
|
||||||
$ticketsRS = $this->executeQuery("SELECT `id`, `status_int` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets`;");
|
// We no longer need to do this thanks to HESK 2.7.0
|
||||||
while ($currentResult = hesk_dbFetchAssoc($ticketsRS)) {
|
//$ticketsRS = $this->executeQuery("SELECT `id`, `status_int` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets`;");
|
||||||
|
//while ($currentResult = hesk_dbFetchAssoc($ticketsRS)) {
|
||||||
$this->executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` SET `status_int` = '" . intval($currentResult['status']) . "' WHERE `id` = " . $currentResult['id']);
|
//
|
||||||
}
|
// $this->executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` SET `status_int` = '" . intval($currentResult['status_int']) . "' WHERE `id` = " . $currentResult['id']);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -7,14 +7,16 @@ use AbstractMigration;
|
|||||||
class MoveStatusesToNewColumn extends AbstractMigration {
|
class MoveStatusesToNewColumn extends AbstractMigration {
|
||||||
|
|
||||||
function up($hesk_settings) {
|
function up($hesk_settings) {
|
||||||
$ticketsRS = $this->executeQuery("SELECT `id`, `status` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets`;");
|
// We no longer need to do this thanks to HESK 2.7.0
|
||||||
while ($currentResult = hesk_dbFetchAssoc($ticketsRS)) {
|
//$ticketsRS = $this->executeQuery("SELECT `id`, `status` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets`;");
|
||||||
|
//while ($currentResult = hesk_dbFetchAssoc($ticketsRS)) {
|
||||||
$this->executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` SET `status_int` = " . $currentResult['status'] . " WHERE `id` = " . $currentResult['id']);
|
//
|
||||||
}
|
// $this->executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` SET `status_int` = " . $currentResult['status'] . " WHERE `id` = " . $currentResult['id']);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
function down($hesk_settings) {
|
function down($hesk_settings) {
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` CHANGE COLUMN `status_int` `status` INT NOT NULL");
|
// We no longer need to do this thanks to HESK 2.7.0
|
||||||
|
//$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` CHANGE COLUMN `status_int` `status` INT NOT NULL");
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -6,10 +6,12 @@ namespace Pre140\Statuses;
|
|||||||
class RenameTempColumn extends \AbstractMigration {
|
class RenameTempColumn extends \AbstractMigration {
|
||||||
|
|
||||||
function up($hesk_settings) {
|
function up($hesk_settings) {
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` CHANGE COLUMN `status_int` `status` INT NOT NULL");
|
// We no longer need to do this thanks to HESK 2.7.0
|
||||||
|
//$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` CHANGE COLUMN `status_int` `status` INT NOT NULL");
|
||||||
}
|
}
|
||||||
|
|
||||||
function down($hesk_settings) {
|
function down($hesk_settings) {
|
||||||
$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` DROP COLUMN `status`");
|
// We no longer need to do this thanks to HESK 2.7.0
|
||||||
|
//$this->executeQuery("ALTER TABLE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets` DROP COLUMN `status`");
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user