[Tasks] Add Task Reward Points Field (#2317)

* Add task reward points field

This replaces the separate DoN crystal reward fields with points and
point_type fields. This will make it easier to import data from
packet/client captures and possibly better support any future clients
or tasks that don't reward through the newer reward window.

* Fix manifest column check
This commit is contained in:
hg
2022-07-30 14:31:34 -04:00
committed by GitHub
parent c68ff9bc5a
commit eaeb583048
7 changed files with 149 additions and 117 deletions
@@ -0,0 +1,13 @@
ALTER TABLE `tasks`
ADD COLUMN `reward_points` INT NOT NULL DEFAULT '0' AFTER `rewardmethod`,
ADD COLUMN `reward_point_type` INT NOT NULL DEFAULT '0' AFTER `reward_points`;
-- convert don crystal points to new fields
UPDATE tasks SET reward_point_type = 4 WHERE reward_radiant_crystals > 0;
UPDATE tasks SET reward_point_type = 5 WHERE reward_ebon_crystals > 0;
UPDATE tasks SET reward_points = reward_radiant_crystals WHERE reward_radiant_crystals > 0;
UPDATE tasks SET reward_points = reward_ebon_crystals WHERE reward_ebon_crystals > 0;
ALTER TABLE `tasks`
DROP COLUMN `reward_radiant_crystals`,
DROP COLUMN `reward_ebon_crystals`;