refactor(DB/Player): Unify two player stat tables. (#17188)

* Init.

Change query table names, move data to existing table.

* Combine two player stat loading functions.
This commit is contained in:
Benjamin Jackson
2023-09-14 20:35:26 -04:00
committed by GitHub
parent ef8f8bf712
commit 358a1e71e0
2 changed files with 45 additions and 87 deletions

View File

@@ -0,0 +1,9 @@
ALTER TABLE `player_class_stats`
ADD COLUMN `BaseHP` int unsigned NOT NULL DEFAULT '1' AFTER `Level`,
ADD COLUMN `BaseMana` int unsigned NOT NULL DEFAULT '1' AFTER `BaseHP`;
UPDATE player_class_stats AS noo
JOIN player_classlevelstats AS ole ON noo.Class = ole.class AND noo.Level = ole.level
SET noo.BaseHP = ole.basehp, noo.BaseMana = ole.basemana;
DROP TABLE IF EXISTS `player_classlevelstats`;