mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 02:14:13 +00:00
Fix an update bug on request time
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user