Initial work on Adding Payment Methods for Online Payments in Client on Agent Side and initial work on AI Providers with multiple model support assigned to various sections and custom prompts
This commit is contained in:
@@ -3680,10 +3680,35 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
|
||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.1'");
|
||||
}
|
||||
|
||||
// if (CURRENT_DATABASE_VERSION == '2.2.1') {
|
||||
// // Insert queries here required to update to DB version 2.2.2
|
||||
if (CURRENT_DATABASE_VERSION == '2.2.1') {
|
||||
mysqli_query($mysqli, "CREATE TABLE `ai_providers` (
|
||||
`ai_provider_id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`ai_provider_name` VARCHAR(200) NOT NULL,
|
||||
`ai_provider_api_url` VARCHAR(200) NOT NULL,
|
||||
`ai_provider_api_key` VARCHAR(200) DEFAULT NULL,
|
||||
`ai_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`ai_updated_at` DATETIME NULL ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`ai_provider_id`)
|
||||
)");
|
||||
|
||||
mysqli_query($mysqli, "CREATE TABLE `ai_provider_models` (
|
||||
`ai_model_provider_id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`ai_model_provider_name` VARCHAR(200) NOT NULL,
|
||||
`ai_model_prompt` TEXT DEFAULT NULL,
|
||||
`ai_model_use_case` VARCHAR(200) DEFAULT NULL,
|
||||
`ai_model_created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`ai_model_updated_at` DATETIME NULL ON UPDATE CURRENT_TIMESTAMP,
|
||||
`ai_model_ai_provider_id` INT(11) NOT NULL,
|
||||
PRIMARY KEY (`ai_model_provider_id`)
|
||||
)");
|
||||
|
||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.2'");
|
||||
}
|
||||
|
||||
// if (CURRENT_DATABASE_VERSION == '2.2.2') {
|
||||
// // Insert queries here required to update to DB version 2.2.3
|
||||
// // Then, update the database to the next sequential version
|
||||
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.2'");
|
||||
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.3'");
|
||||
// }
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user