Skip to content

Latest commit

 

History

History
163 lines (159 loc) · 5.19 KB

MIGRATION.md

File metadata and controls

163 lines (159 loc) · 5.19 KB

Migrations guide

Leaderboard v6: VMAD to Golbat

The app now uses Golbat as backend to process the player data. To make it compatible:

  • First you need to setup Golbat.
  • Then configure the leaderboard to connect to Golbat. The configuration key madDatabase has been renamed to scannerDatabase
  • Then, run the command npm run schema:migrate
  • Then you can import your trainers from vmad to Golbat by running this query:
INSERT INTO golbat.player(`friendship_id`,
                          `name`,
                          `last_seen`,
                          `team`,
                          `level`,
                          `xp`,
                          `battles_won`,
                          `km_walked`,
                          `caught_pokemon`,
                          `gbl_rank`,
                          `gbl_rating`,
                          `event_badges`,
                          `stops_spun`,
                          `evolved`,
                          `hatched`,
                          `quests`,
                          `trades`,
                          `photobombs`,
                          `purified`,
                          `grunts_defeated`,
                          `gym_battles_won`,
                          `normal_raids_won`,
                          `legendary_raids_won`,
                          `trainings_won`,
                          `berries_fed`,
                          `hours_defended`,
                          `best_friends`,
                          `best_buddies`,
                          `giovanni_defeated`,
                          `mega_evos`,
                          `collections_done`,
                          `unique_stops_spun`,
                          `unique_mega_evos`,
                          `unique_raid_bosses`,
                          `unique_unown`,
                          `seven_day_streaks`,
                          `trade_km`,
                          `raids_with_friends`,
                          `caught_at_lure`,
                          `wayfarer_agreements`,
                          `trainers_referred`,
                          `raid_achievements`,
                          `xl_karps`,
                          `xs_rats`,
                          `pikachu_caught`,
                          `league_great_won`,
                          `league_ultra_won`,
                          `league_master_won`,
                          `dex_gen1`,
                          `dex_gen2`,
                          `dex_gen3`,
                          `dex_gen4`,
                          `dex_gen5`,
                          `dex_gen6`,
                          `dex_gen7`,
                          `dex_gen8`,
                          `caught_normal`,
                          `caught_fighting`,
                          `caught_flying`,
                          `caught_poison`,
                          `caught_ground`,
                          `caught_rock`,
                          `caught_bug`,
                          `caught_ghost`,
                          `caught_steel`,
                          `caught_fire`,
                          `caught_water`,
                          `caught_grass`,
                          `caught_electric`,
                          `caught_psychic`,
                          `caught_ice`,
                          `caught_dragon`,
                          `caught_dark`,
                          `caught_fairy`)
SELECT `trainer_id`,
       `name`,
       UNIX_TIMESTAMP(`last_seen`),
       `team`,
       `level`,
       `xp`,
       `battles_won`,
       `km_walked`,
       `caught_pokemon`,
       `gbl_rank`,
       `gbl_rating`,
       `special_badges`,
       `stops_spun`,
       `evolved`,
       `hatched`,
       `quests`,
       `trades`,
       `photobombs`,
       `purified`,
       `grunts_defeated`,
       `gym_battles_won`,
       `normal_raids_won`,
       `legendary_raids_won`,
       `trainings_won`,
       `berries_fed`,
       `hours_defended`,
       `best_friends`,
       `best_buddies`,
       `giovanni_defeated`,
       `mega_evos`,
       `collections_done`,
       `unique_stops_spun`,
       `unique_mega_evos`,
       `unique_raid_bosses`,
       `unique_unown`,
       `7_day_streaks`,
       `trade_km`,
       `raids_with_friends`,
       `caught_at_lure`,
       `wayfarer_agreements`,
       `trainers_referred`,
       `raid_achievements`,
       `xl_karps`,
       `xs_rats`,
       `pikachu_caught`,
       `league_great_won`,
       `league_ultra_won`,
       `league_master_won`,
       `dex_gen1`,
       `dex_gen2`,
       `dex_gen3`,
       `dex_gen4`,
       `dex_gen5`,
       `dex_gen6`,
       `dex_gen7`,
       `dex_gen8`,
       `caught_normal`,
       `caught_fighting`,
       `caught_flying`,
       `caught_poison`,
       `caught_ground`,
       `caught_rock`,
       `caught_bug`,
       `caught_ghost`,
       `caught_steel`,
       `caught_fire`,
       `caught_water`,
       `caught_grass`,
       `caught_electric`,
       `caught_psychic`,
       `caught_ice`,
       `caught_dragon`,
       `caught_dark`,
       `caught_fairy`
FROM vmad.cev_trainer;