Skip to content

Commit bf9c2f6

Browse files
authored
Merge pull request #1182 from itflow-org/tck-fr-at
Add database field for ticket_first_response_at.
2 parents c7d00d7 + 44b70d7 commit bf9c2f6

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

database_updates.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2423,10 +2423,16 @@ function processFile($file_path, $file_name, $mysqli) {
24232423
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.8.7'");
24242424
}
24252425

2426-
// if (CURRENT_DATABASE_VERSION == '1.8.7') {
2427-
// // Insert queries here required to update to DB version 1.8.8
2426+
if (CURRENT_DATABASE_VERSION == '1.8.7') {
2427+
mysqli_query($mysqli, "ALTER TABLE `tickets` ADD `ticket_first_response_at` DATETIME NULL DEFAULT NULL AFTER `ticket_archived_at`");
2428+
2429+
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.8.8'");
2430+
}
2431+
2432+
// if (CURRENT_DATABASE_VERSION == '1.8.8') {
2433+
// // Insert queries here required to update to DB version 1.8.9
24282434
// // Then, update the database to the next sequential version
2429-
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.8.8'");
2435+
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.8.9'");
24302436
// }
24312437

24322438
} else {

db.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2139,6 +2139,7 @@ CREATE TABLE `tickets` (
21392139
`ticket_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
21402140
`ticket_resolved_at` datetime DEFAULT NULL,
21412141
`ticket_archived_at` datetime DEFAULT NULL,
2142+
`ticket_first_response_at` datetime DEFAULT NULL,
21422143
`ticket_closed_at` datetime DEFAULT NULL,
21432144
`ticket_created_by` int(11) NOT NULL,
21442145
`ticket_assigned_to` int(11) NOT NULL DEFAULT 0,

includes/database_version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
* It is used in conjunction with database_updates.php
66
*/
77

8-
DEFINE("LATEST_DATABASE_VERSION", "1.8.7");
8+
DEFINE("LATEST_DATABASE_VERSION", "1.8.8");

0 commit comments

Comments
 (0)