[Feature] The Start of AI Integration within ITFlow

This commit is contained in:
johnnyq
2024-02-05 21:01:34 -05:00
parent e7586fcfb5
commit dc69101624
8 changed files with 118 additions and 6 deletions

View File

@@ -1571,14 +1571,25 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.0.3'");
}
if (CURRENT_DATABASE_VERSION == '1.0.3') {
//Insert queries here required to update to DB version 1.0.4
mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ai_enable` TINYINT(1) DEFAULT 0 AFTER `config_stripe_percentage_fee`");
mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ai_provider` VARCHAR(250) DEFAULT NULL AFTER `config_ai_enable`");
mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ai_url` VARCHAR(250) DEFAULT NULL AFTER `config_ai_provider`");
mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_ai_api_key` VARCHAR(250) DEFAULT NULL AFTER `config_ai_url`");
//Then, update the database to the next sequential version
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.0.4'");
}
// Be sure to change database_version.php to reflect the version you are updating to here
// Please add this same comment block to the bottom of this file, and update the version number.
// Uncomment Below Lines, to add additional database updates
//
// if (CURRENT_DATABASE_VERSION == '1.0.3') {
// // Insert queries here required to update to DB version 1.0.4
// if (CURRENT_DATABASE_VERSION == '1.0.4') {
// // Insert queries here required to update to DB version 1.0.5
// // Then, update the database to the next sequential version
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.0.4'");
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '1.0.5'");
// }
} else {