[Database] Fix default value for time_of_death in character_corpses (#4060)

* [Database] Fix default value for `time_of_death` in `character_corpses`

* Extra `NULL`

* Update repository

* Repositories with updated structure this time
This commit is contained in:
JJ 2024-02-11 16:12:07 -05:00 committed by GitHub
parent 3e6924d10e
commit 86a2a86ba8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 2 deletions

View File

@ -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,

View File

@ -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;

View File

@ -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