Conversation
Collaborator
|
I've been running this for the day and can confirm it's working fine. fyi: old raids are all set to temp_evo_id = 0, whereas mega raids should obviously have a value there. Personally, I just set temp_evo_id for all level 6 raids to 1. There's other raid levels too that have megas, so consider those if you care. This is "made up" data and does not account for mega forms, so a migration should not be part of Golbat. #348 discusses this query a little. I just did this: CREATE TEMPORARY TABLE tmp_merge_raid AS
SELECT date, area, fence, level, pokemon_id, form_id, 1 AS temp_evo_id, SUM(count) AS count
FROM raid_stats
WHERE level = 6
GROUP BY date, area, fence, level, pokemon_id, form_id;
DELETE FROM raid_stats WHERE level = 6;
INSERT INTO raid_stats SELECT * FROM tmp_merge_raid;
DROP TABLE tmp_merge_raid; |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will add mega information to raid stats
conflicts on migration with #348 , be careful with any testing