Removed watcher_created_at field as its irrelevant

This commit is contained in:
johnnyq 2023-08-03 18:08:06 -04:00
parent dd46c5bcab
commit 0aedf95892
3 changed files with 12 additions and 5 deletions

View File

@ -1172,11 +1172,19 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.5'");
}
//if (CURRENT_DATABASE_VERSION == '0.6.5') {
if (CURRENT_DATABASE_VERSION == '0.6.5') {
//Insert queries here required to update to DB version 0.6.6
mysqli_query($mysqli, "ALTER TABLE `ticket_watchers` DROP `watcher_created_at`");
// Then, update the database to the next sequential version
//mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.6'");
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.6'");
}
//if (CURRENT_DATABASE_VERSION == '0.6.6') {
//Insert queries here required to update to DB version 0.6.7
// Then, update the database to the next sequential version
//mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.6.7'");
//}
} else {

View File

@ -5,4 +5,4 @@
* It is used in conjunction with database_updates.php
*/
DEFINE("LATEST_DATABASE_VERSION", "0.6.5");
DEFINE("LATEST_DATABASE_VERSION", "0.6.6");

3
db.sql
View File

@ -1430,7 +1430,6 @@ CREATE TABLE `ticket_watchers` (
`watcher_id` int(11) NOT NULL AUTO_INCREMENT,
`watcher_name` varchar(255) DEFAULT NULL,
`watcher_email` varchar(255) NOT NULL,
`watcher_created_at` datetime NOT NULL DEFAULT current_timestamp(),
`watcher_ticket_id` int(11) NOT NULL,
PRIMARY KEY (`watcher_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
@ -1638,4 +1637,4 @@ CREATE TABLE `vendors` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-08-01 13:03:12
-- Dump completed on 2023-08-03 18:07:23