From cbcfa2f2dfdf5a044c6fbf40167262623fd2f115 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Fri, 2 Oct 2015 19:35:02 -0500 Subject: [PATCH 1/2] Fix issue with an old SQL update and newer database engines [skip ci] --- .../required/2014_12_31_npc_types_default_values_update.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/sql/git/required/2014_12_31_npc_types_default_values_update.sql b/utils/sql/git/required/2014_12_31_npc_types_default_values_update.sql index b75544981..d06f3f74c 100644 --- a/utils/sql/git/required/2014_12_31_npc_types_default_values_update.sql +++ b/utils/sql/git/required/2014_12_31_npc_types_default_values_update.sql @@ -1,3 +1,6 @@ +UPDATE `npc_types` SET `bodytype` = 0 WHERE `bodytype` IS NULL; ALTER TABLE `npc_types` MODIFY `bodytype` INT(11) NOT NULL DEFAULT '1'; +UPDATE `npc_types` SET `d_melee_texture1` = 0 WHERE `d_melee_texture1` IS NULL; ALTER TABLE `npc_types` MODIFY `d_melee_texture1` INT(11) NOT NULL DEFAULT '0'; +UPDATE `npc_types` SET `d_melee_texture2` = 0 WHERE `d_melee_texture2` IS NULL; ALTER TABLE `npc_types` MODIFY `d_melee_texture2` INT(11) NOT NULL DEFAULT '0'; From 1e3f7b14c8c9b005b6997eeb4dad7a50336da86e Mon Sep 17 00:00:00 2001 From: Akkadius Date: Fri, 2 Oct 2015 19:40:58 -0500 Subject: [PATCH 2/2] Bots database versioning (prep) [skip ci] --- common/version.h | 2 +- utils/sql/git/bots/bots_db_update_manifest.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/version.h b/common/version.h index b74021225..ed3167e9a 100644 --- a/common/version.h +++ b/common/version.h @@ -32,7 +32,7 @@ #define CURRENT_BINARY_DATABASE_VERSION 9087 #ifdef BOTS - #define CURRENT_BINARY_BOTS_DATABASE_VERSION 8001 + #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9001 #else #define CURRENT_BINARY_BOTS_DATABASE_VERSION 0 // must be 0 #endif diff --git a/utils/sql/git/bots/bots_db_update_manifest.txt b/utils/sql/git/bots/bots_db_update_manifest.txt index adb3e8b5e..413f91444 100644 --- a/utils/sql/git/bots/bots_db_update_manifest.txt +++ b/utils/sql/git/bots/bots_db_update_manifest.txt @@ -1,7 +1,7 @@ -8000|2015_09_30_bots_fix_existing.sql|SHOW TABLES LIKE 'bot%'|not_empty| -8001|2015_09_30_bots.sql|SHOW TABLES LIKE 'bot%'|empty| +9000|2015_09_30_bots_fix_existing.sql|SHOW TABLES LIKE 'bot%'|not_empty| +9001|2015_09_30_bots.sql|SHOW TABLES LIKE 'bot%'|empty| -9000|2015_09_30_bots_initial_updates.sql||| +9002|2015_09_30_bots_initial_updates.sql||| # Upgrade conditions: # This won't be needed after this system is implemented, but it is used database that are not