From 9d2f25839072a8a4e0691a2726c7b3a33c52f0d3 Mon Sep 17 00:00:00 2001 From: Chris Miles Date: Sun, 29 Oct 2023 18:45:30 -0500 Subject: [PATCH] [Database] Add id to variables table (#3658) --- common/database/database_update_manifest.cpp | 14 ++++++++++++++ common/version.h | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/common/database/database_update_manifest.cpp b/common/database/database_update_manifest.cpp index 0880c3b10..e67ccd793 100644 --- a/common/database/database_update_manifest.cpp +++ b/common/database/database_update_manifest.cpp @@ -4981,6 +4981,20 @@ ADD COLUMN `min_expansion` tinyint(4) NOT NULL DEFAULT -1 AFTER `description`, ADD COLUMN `max_expansion` tinyint(4) NOT NULL DEFAULT -1 AFTER `min_expansion`, ADD COLUMN `content_flags` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL AFTER `max_expansion`, ADD COLUMN `content_flags_disabled` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL AFTER `content_flags`; +)" + }, + ManifestEntry{ + .version = 9240, + .description = "2023_10_29_variables_id.sql", + .check = "SHOW COLUMNS FROM `variables` LIKE 'id'", + .condition = "empty", + .match = "", + .sql = R"( +ALTER TABLE `variables` +ADD COLUMN `id` int(11) NOT NULL AUTO_INCREMENT FIRST, +DROP PRIMARY KEY, +ADD PRIMARY KEY (`id`) USING BTREE, +ADD UNIQUE INDEX(`varname`); )" }, diff --git a/common/version.h b/common/version.h index 79aa0f70c..1badce492 100644 --- a/common/version.h +++ b/common/version.h @@ -42,7 +42,7 @@ * Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9239 +#define CURRENT_BINARY_DATABASE_VERSION 9240 #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9040