-
-
Notifications
You must be signed in to change notification settings - Fork 647
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a big one, players would stop saving correctly after getting exp boosts from daily rewards totally more than max tiny int. Fixes: - Change DB column to uint16 (same as the c++ variable type) - Programatically set the max value to 12 hours (or 43,200 seconds)
- Loading branch information
Showing
4 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
function onUpdateDatabase() | ||
return false -- true = There are others migrations file | false = this is the last migration file | ||
logger.info("Updating database to version 42 (fix xpboost types)") | ||
|
||
db.query([[ | ||
ALTER TABLE `players` | ||
MODIFY `xpboost_stamina` smallint(5) UNSIGNED DEFAULT NULL, | ||
MODIFY `xpboost_value` tinyint(4) UNSIGNED DEFAULT NULL | ||
]]) | ||
|
||
return true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
function onUpdateDatabase() | ||
return false -- true = There are others migrations file | false = this is the last migration file | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters