Skip to content

Commit

Permalink
Merge pull request #6638 from LandSandBoat/abyssea-unlock-migration
Browse files Browse the repository at this point in the history
Fix traverser_start datatype, set epoch function
  • Loading branch information
claywar authored Jan 2, 2025
2 parents 9a3b2c1 + f3ced15 commit fd1983e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sql/char_unlocks.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CREATE TABLE `char_unlocks` (
`campaign_windy` int(10) unsigned NOT NULL DEFAULT 0,
`homepoints` blob DEFAULT NULL,
`survivals` blob DEFAULT NULL,
`traverser_start` int(10) unsigned NOT NULL DEFAULT 0,
`traverser_start` TIMESTAMP DEFAULT 0,
`traverser_claimed` int(10) unsigned NOT NULL DEFAULT 0,
`abyssea_conflux` blob DEFAULT NULL,
`waypoints` blob DEFAULT NULL,
Expand Down
2 changes: 1 addition & 1 deletion src/map/utils/charutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6860,7 +6860,7 @@ namespace charutils
{
TracyZoneScoped;

auto fmtQuery = "UPDATE char_unlocks SET traverser_start = unix_timestamp() WHERE charid = %u";
auto fmtQuery = "UPDATE char_unlocks SET traverser_start = CURRENT_TIMESTAMP() WHERE charid = %u";

_sql->Query(fmtQuery, PChar->id);
}
Expand Down
2 changes: 1 addition & 1 deletion tools/migrations/026_abyssea_unlocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def migrate(cur, db):
try:
cur.execute(
"ALTER TABLE char_unlocks \
ADD COLUMN `traverser_start` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, \
ADD COLUMN `traverser_start` TIMESTAMP DEFAULT 0, \
ADD COLUMN `traverser_claimed` int(10) unsigned NOT NULL DEFAULT '0';"
)
db.commit()
Expand Down

0 comments on commit fd1983e

Please sign in to comment.