From a9dff350a504fc7d8aa04b3b2c26a715a65d310d Mon Sep 17 00:00:00 2001 From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com> Date: Wed, 13 Aug 2025 09:32:14 +0200 Subject: [PATCH] Fix an update bug on request time --- application/migrations/252_add_oqrs_cascade.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/migrations/252_add_oqrs_cascade.php b/application/migrations/252_add_oqrs_cascade.php index f0823119e..d7ff8baf7 100644 --- a/application/migrations/252_add_oqrs_cascade.php +++ b/application/migrations/252_add_oqrs_cascade.php @@ -8,6 +8,7 @@ class Migration_add_oqrs_cascade extends CI_Migration { $this->dbtry("ALTER TABLE oqrs MODIFY COLUMN qsoid BIGINT(20) UNSIGNED;"); $this->dbtry("ALTER TABLE oqrs ADD UNIQUE (qsoid)"); $this->dbtry("ALTER TABLE oqrs ADD CONSTRAINT oqrs_logbook_fk FOREIGN KEY (qsoid) REFERENCES " . $this->config->item('table_name') . " (COL_PRIMARY_KEY) ON DELETE CASCADE ON UPDATE RESTRICT;"); + $this->dbtry("ALTER TABLE oqrs MODIFY requesttime TIMESTAMP DEFAULT CURRENT_TIMESTAMP;"); } public function down(){ @@ -19,7 +20,7 @@ class Migration_add_oqrs_cascade extends CI_Migration { try { $this->db->query($what); } catch (Exception $e) { - log_message("error", "Something gone wrong while altering FKs: ".$e." // Executing: ".$this->db->last_query()); + log_message("error", "Something gone wrong while altering the OQRS table: ".$e." // Executing: ".$this->db->last_query()); } } }