Fixing some down migrations

master
Mike Koch 7 years ago
parent 86a76fc460
commit 308f7431e7
No known key found for this signature in database
GPG Key ID: 9BA5D7F8391455ED

@ -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']);

@ -28,5 +28,6 @@ class InsertStatusRecords extends \AbstractMigration {
}
function down($hesk_settings) {
$this->executeQuery("DELETE FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "statuses`");
}
}
Loading…
Cancel
Save