diff --git a/install/migrations/Pre140/Statuses/DropOldStatusColumn.php b/install/migrations/Pre140/Statuses/DropOldStatusColumn.php index 31c91bd7..eb41f6b6 100644 --- a/install/migrations/Pre140/Statuses/DropOldStatusColumn.php +++ b/install/migrations/Pre140/Statuses/DropOldStatusColumn.php @@ -12,7 +12,7 @@ class DropOldStatusColumn extends AbstractMigration { } function down($hesk_settings) { - $ticketsRS = $this->executeQuery("SELECT `id`, `status` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "tickets`;"); + $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']); diff --git a/install/migrations/Pre140/Statuses/InsertStatusRecords.php b/install/migrations/Pre140/Statuses/InsertStatusRecords.php index be943f32..37580121 100644 --- a/install/migrations/Pre140/Statuses/InsertStatusRecords.php +++ b/install/migrations/Pre140/Statuses/InsertStatusRecords.php @@ -28,5 +28,6 @@ class InsertStatusRecords extends \AbstractMigration { } function down($hesk_settings) { + $this->executeQuery("DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses`"); } } \ No newline at end of file