From d302b9c02e34cf1d7f2edf8e623fc4fe15a6209c Mon Sep 17 00:00:00 2001 From: Mitch Freeman <65987027+neckkola@users.noreply.github.com> Date: Sun, 12 May 2024 08:53:42 -0300 Subject: [PATCH] [Fix} Correct a guild bank dup issue (#4308) When depositing an item in the guild bank with an unlimited charge (-1) a db error would occur resulting in a duplication issue. Can test with item id 70208 --- common/database/database_update_manifest.cpp | 11 +++++++++++ common/version.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/common/database/database_update_manifest.cpp b/common/database/database_update_manifest.cpp index c4dbbe485..120347803 100644 --- a/common/database/database_update_manifest.cpp +++ b/common/database/database_update_manifest.cpp @@ -5567,6 +5567,17 @@ ADD COLUMN `is_parcel_merchant` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER ` .sql = R"( ALTER TABLE `character_data` ADD COLUMN `extra_haste` int(11) NOT NULL DEFAULT 0 AFTER `wis`; +)" + }, + ManifestEntry{ + .version = 9276, + .description = "2024_05_12_fix_guild_bank_dup_issue.sql", + .check = "SHOW COLUMNS FROM `guild_bank` WHERE FIELD = 'qty' AND Type LIKE '%unsigned';", + .condition = "not_empty", + .match = "", + .sql = R"( +ALTER TABLE `guild_bank` + CHANGE COLUMN `qty` `qty` INT(10) NOT NULL DEFAULT '0' AFTER `itemid`; )" } // -- template; copy/paste this when you need to create a new entry diff --git a/common/version.h b/common/version.h index c454859b8..6bf65d67f 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 9275 +#define CURRENT_BINARY_DATABASE_VERSION 9276 #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9044 #endif