diff --git a/common/database/database_update_manifest.cpp b/common/database/database_update_manifest.cpp index 84f576a74..f5d5d4240 100644 --- a/common/database/database_update_manifest.cpp +++ b/common/database/database_update_manifest.cpp @@ -5346,6 +5346,16 @@ CREATE TABLE guild_tributes ( ) ENGINE=InnoDB; )" }, + ManifestEntry{ + .version = 9261, + .description = "2024_02_11_character_corpses.sql", + .check = "SHOW COLUMNS FROM `character_corpses` LIKE 'time_of_death'", + .condition = "contains", + .match = "0000-00-00 00:00:00", + .sql = R"( +ALTER TABLE `character_corpses` MODIFY COLUMN `time_of_death` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP; + )" + } // -- template; copy/paste this when you need to create a new entry // ManifestEntry{ // .version = 9228, diff --git a/common/repositories/base/base_character_corpses_repository.h b/common/repositories/base/base_character_corpses_repository.h index dd8cacb5b..de6aebca9 100644 --- a/common/repositories/base/base_character_corpses_repository.h +++ b/common/repositories/base/base_character_corpses_repository.h @@ -237,7 +237,7 @@ public: e.y = 0; e.z = 0; e.heading = 0; - e.time_of_death = 0; + e.time_of_death = std::time(nullptr); e.guild_consent_id = 0; e.is_rezzed = 0; e.is_buried = 0; diff --git a/common/version.h b/common/version.h index d2fbbe9fc..7906d27eb 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 9260 +#define CURRENT_BINARY_DATABASE_VERSION 9261 #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9042 #endif