mirror of https://github.com/itflow-org/itflow
DB Stucture Update: Added Ticket History Table to keep track of ticket events such as priority changes, ticket status, assignment, task completion etc
This commit is contained in:
parent
5211ba73d5
commit
23cc47f8f5
|
|
@ -2218,10 +2218,24 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
|
|||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.6.4'");
|
||||
}
|
||||
|
||||
// if (CURRENT_DATABASE_VERSION == '1.6.4') {
|
||||
// // Insert queries here required to update to DB version 1.6.5
|
||||
if (CURRENT_DATABASE_VERSION == '1.6.4') {
|
||||
|
||||
mysqli_query($mysqli, "CREATE TABLE `ticket_history` (
|
||||
`ticket_history_id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`ticket_history_status` VARCHAR(200) NOT NULL,
|
||||
`ticket_history_description` VARCHAR(255) NOT NULL,
|
||||
`ticket_history_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`ticket_history_ticket_id` INT(11) NOT NULL,
|
||||
PRIMARY KEY (`ticket_history_id`)
|
||||
)");
|
||||
|
||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.6.5'");
|
||||
}
|
||||
|
||||
// if (CURRENT_DATABASE_VERSION == '1.6.5') {
|
||||
// // Insert queries here required to update to DB version 1.6.6
|
||||
// // Then, update the database to the next sequential version
|
||||
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.6.5'");
|
||||
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.6.6'");
|
||||
// }
|
||||
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@
|
|||
* It is used in conjunction with database_updates.php
|
||||
*/
|
||||
|
||||
DEFINE("LATEST_DATABASE_VERSION", "1.6.4");
|
||||
DEFINE("LATEST_DATABASE_VERSION", "1.6.5");
|
||||
|
|
|
|||
19
db.sql
19
db.sql
|
|
@ -1793,6 +1793,23 @@ CREATE TABLE `ticket_attachments` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `ticket_history`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `ticket_history`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `ticket_history` (
|
||||
`ticket_history_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`ticket_history_status` varchar(200) NOT NULL,
|
||||
`ticket_history_description` varchar(255) NOT NULL,
|
||||
`ticket_history_created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
||||
`ticket_history_ticket_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`ticket_history_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `ticket_replies`
|
||||
--
|
||||
|
|
@ -2149,4 +2166,4 @@ CREATE TABLE `vendors` (
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2024-10-30 18:39:35
|
||||
-- Dump completed on 2024-11-04 12:20:25
|
||||
|
|
|
|||
Loading…
Reference in New Issue