From 7b19225e48f7b0f4c74acadc09c8d69b22e1f5f2 Mon Sep 17 00:00:00 2001 From: JJ <3617814+joligario@users.noreply.github.com> Date: Fri, 3 May 2024 08:42:49 +0300 Subject: [PATCH] [Database] Break out changes to `npc_types` from parcels (#4295) * [Database] Break out changes to `npc_types` from parcels # Description Breaking out changes to `npc_types` table to its own update since we need to alter the content schema. See #4198. ## Type of change - [X] Bug fix (non-breaking change which fixes an issue) # Testing Clients tested: N/A # Checklist - [X] I have tested my changes - [X] I have performed a self-review of my code. Ensuring variables, functions and methods are named in a human-readable way, comments are added only where naming of variables, functions and methods can't give enough context. - [X] I own the changes of my code and take responsibility for the potential issues that occur - [X] If my changes make database schema changes, I have tested the changes on a local database. Updated version.h CURRENT_BINARY_DATABASE_VERSION to the new version. * Remove extra line --- common/database/database_update_manifest.cpp | 15 ++++++++++++--- common/version.h | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/common/database/database_update_manifest.cpp b/common/database/database_update_manifest.cpp index fb14fcf41..bdd947943 100644 --- a/common/database/database_update_manifest.cpp +++ b/common/database/database_update_manifest.cpp @@ -5516,9 +5516,6 @@ ALTER TABLE `lootdrop_entries` ADD `content_flags_disabled` varchar(100) NULL; COLLATE='latin1_swedish_ci' ENGINE=InnoDB AUTO_INCREMENT=1; - - ALTER TABLE `npc_types` - ADD COLUMN `is_parcel_merchant` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `keeps_sold_items`; )" }, ManifestEntry{ @@ -5546,6 +5543,18 @@ ALTER TABLE `character_parcels` .sql = R"( ALTER TABLE `doors` ADD COLUMN `close_timer_ms` smallint(8) UNSIGNED NOT NULL DEFAULT 5000 AFTER `is_ldon_door`; +)", + .content_schema_update = true + }, + ManifestEntry{ + .version = 9274, + .description = "2024_05_02_parcel_npc_content.sql", + .check = "SHOW COLUMNS FROM `npc_types` LIKE 'is_parcel_merchant'", + .condition = "empty", + .match = "", + .sql = R"( +ALTER TABLE `npc_types` +ADD COLUMN `is_parcel_merchant` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `keeps_sold_items`; )", .content_schema_update = true } diff --git a/common/version.h b/common/version.h index 2113d331c..23df97055 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 9273 +#define CURRENT_BINARY_DATABASE_VERSION 9274 #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9043 #endif