[Database] Proper default for droptime from object_contents (#4061)

This commit is contained in:
JJ 2024-02-11 17:59:48 -05:00 committed by GitHub
parent 86a2a86ba8
commit 6bc9bcf15a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 2 deletions

View File

@ -5355,6 +5355,16 @@ CREATE TABLE guild_tributes (
.sql = R"(
ALTER TABLE `character_corpses` MODIFY COLUMN `time_of_death` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP;
)"
},
ManifestEntry{
.version = 9262,
.description = "2024_02_11_object_contents.sql",
.check = "SHOW COLUMNS FROM `object_contents` LIKE 'droptime'",
.condition = "contains",
.match = "0000-00-00 00:00:00",
.sql = R"(
ALTER TABLE `character_corpses` MODIFY COLUMN `droptime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP;
)"
}
// -- template; copy/paste this when you need to create a new entry
// ManifestEntry{

View File

@ -116,7 +116,7 @@ public:
e.bagidx = 0;
e.itemid = 0;
e.charges = 0;
e.droptime = 0;
e.droptime = std::time(nullptr);
e.augslot1 = 0;
e.augslot2 = 0;
e.augslot3 = 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 9261
#define CURRENT_BINARY_DATABASE_VERSION 9262
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9042
#endif