Add domain_notes database field

This commit is contained in:
Marcus Hill
2023-12-31 10:34:01 +00:00
parent 938f8bb4ae
commit 114a72424c
3 changed files with 16 additions and 7 deletions
+12 -4
View File
@@ -1418,7 +1418,7 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
//
// Then, update the database to the next sequential version
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.9'");
}
}
if (CURRENT_DATABASE_VERSION == '0.8.9') {
@@ -1524,14 +1524,22 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.8'");
}
if (CURRENT_DATABASE_VERSION == '0.9.8') {
//Insert queries here required to update to DB version 0.9.9
mysqli_query($mysqli, "ALTER TABLE `domains` ADD `domain_notes` TEXT NULL DEFAULT NULL AFTER `domain_raw_whois`");
//Then, update the database to the next sequential version
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.9'");
}
// 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 == '0.9.8') {
// // Insert queries here required to update to DB version 0.9.9
// if (CURRENT_DATABASE_VERSION == '0.9.9') {
// // Insert queries here required to update to DB version 0.10.0
// // Then, update the database to the next sequential version
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.9'");
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.10.0'");
// }
} else {
+1 -1
View File
@@ -5,5 +5,5 @@
* It is used in conjunction with database_updates.php
*/
DEFINE("LATEST_DATABASE_VERSION", "0.9.8");
DEFINE("LATEST_DATABASE_VERSION", "0.9.9");
+1
View File
@@ -505,6 +505,7 @@ CREATE TABLE `domains` (
`domain_mail_servers` varchar(255) DEFAULT NULL,
`domain_txt` text DEFAULT NULL,
`domain_raw_whois` text DEFAULT NULL,
`domain_notes` text DEFAULT NULL,
`domain_created_at` datetime NOT NULL DEFAULT current_timestamp(),
`domain_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`domain_archived_at` datetime DEFAULT NULL,