mirror of https://github.com/itflow-org/itflow
Added Timezone to the DB settings option will come soon also added 3 sec wait between Application Updates and DB Updates to fix issue where after update and DB has an update but does not show it
This commit is contained in:
parent
7685029016
commit
58fe752bd9
|
|
@ -854,11 +854,17 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
|
|||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.4.2'");
|
||||
}
|
||||
|
||||
//if (CURRENT_DATABASE_VERSION == '0.4.2') {
|
||||
// Insert queries here required to update to DB version 0.4.3
|
||||
if (CURRENT_DATABASE_VERSION == '0.4.2') {
|
||||
mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_timezone` VARCHAR(200) NOT NULL DEFAULT 'America/New_York' AFTER `config_telemetry`");
|
||||
|
||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.4.3'");
|
||||
}
|
||||
|
||||
//if (CURRENT_DATABASE_VERSION == '0.4.3') {
|
||||
// Insert queries here required to update to DB version 0.4.4
|
||||
|
||||
// Then, update the database to the next sequential version
|
||||
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.4.3'");
|
||||
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.4.4'");
|
||||
//}
|
||||
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@
|
|||
* It is used in conjunction with database_updates.php
|
||||
*/
|
||||
|
||||
DEFINE("LATEST_DATABASE_VERSION", "0.4.2");
|
||||
DEFINE("LATEST_DATABASE_VERSION", "0.4.3");
|
||||
|
|
|
|||
3
db.sql
3
db.sql
|
|
@ -1094,6 +1094,7 @@ CREATE TABLE `settings` (
|
|||
`config_module_enable_ticketing` tinyint(1) NOT NULL DEFAULT 1,
|
||||
`config_theme` varchar(200) DEFAULT 'blue',
|
||||
`config_telemetry` tinyint(1) DEFAULT 0,
|
||||
`config_timezone` varchar(200) NOT NULL DEFAULT 'America/New_York',
|
||||
PRIMARY KEY (`company_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
|
@ -1537,4 +1538,4 @@ CREATE TABLE `vendors` (
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2023-02-05 13:31:22
|
||||
-- Dump completed on 2023-02-09 14:35:51
|
||||
|
|
|
|||
4
post.php
4
post.php
|
|
@ -1809,6 +1809,8 @@ if(isset($_GET['update'])){
|
|||
|
||||
$_SESSION['alert_message'] = "Updates successful";
|
||||
|
||||
sleep(3);
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
|
||||
}
|
||||
|
|
@ -1828,6 +1830,8 @@ if(isset($_GET['update_db'])){
|
|||
|
||||
$_SESSION['alert_message'] = "Database structure update successful";
|
||||
|
||||
sleep(3);
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue