Used the DB Update function to write new repo_branch var for docker the new docker to function properly

This commit is contained in:
johnnyq
2023-01-13 21:44:13 -05:00
parent c0399a2c42
commit 3baea5e757
3 changed files with 18 additions and 5 deletions

View File

@@ -424,11 +424,23 @@ if(LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION){
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.2.6'");
}
//if(CURRENT_DATABASE_VERSION == '0.2.6'){
// Insert queries here required to update to DB version 0.2.7
if(CURRENT_DATABASE_VERSION == '0.2.6'){
// Insert queries here required to update to DB version 0.2.7
mysqli_query($mysqli, "ALTER TABLE `contacts` ADD `contact_token_expire` DATETIME NULL DEFAULT NULL AFTER `contact_password_reset_token`");
// Update config.php var with new version var for use with docker
file_put_contents("config.php", "\$repo_branch = 'master';" . PHP_EOL, FILE_APPEND);
// Then, update the database to the next sequential version
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.2.7'");
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.2.7'");
}
//if(CURRENT_DATABASE_VERSION == '0.2.7'){
// Insert queries here required to update to DB version 0.2.8
// Then, update the database to the next sequential version
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.2.8'");
//}