Closed ryanjsims closed 2 years ago
Adds a migration that will add the adjustedBattleRank field to the database along with converting ASP from bool to number. (false -> 0, true -> 1)
adjustedBattleRank
false
true
Unfortunately since ASP2 was stored the same as non-ASPed players, ASP2 players will be treated as non-ASP until updated by death event.
This doesn't update the instance aggregate collection so alert history isn't updated with new values.
Also PS4 is weird for whatever reason and the asp field for PS4 characters is either null or undefined ¯\_(ツ)_/¯ so this converts those to 0
asp
null
undefined
Migration usage: Usage: npm install -g migrate-mongo cd stack/mongo
npm install -g migrate-mongo
cd stack/mongo
Apply: DBURL="mongodb://<user>:<pass>@<host>:<port>/ps2alerts" migrate-mongo up Revert: DBURL="mongodb://<user>:<pass>@<host>:<port>/ps2alerts" migrate-mongo down
DBURL="mongodb://<user>:<pass>@<host>:<port>/ps2alerts" migrate-mongo up
DBURL="mongodb://<user>:<pass>@<host>:<port>/ps2alerts" migrate-mongo down
Adds a migration that will add the
adjustedBattleRank
field to the database along with converting ASP from bool to number. (false
-> 0,true
-> 1)Unfortunately since ASP2 was stored the same as non-ASPed players, ASP2 players will be treated as non-ASP until updated by death event.
This doesn't update the instance aggregate collection so alert history isn't updated with new values.
Also PS4 is weird for whatever reason and the
asp
field for PS4 characters is eithernull
orundefined
¯\_(ツ)_/¯ so this converts those to 0Migration usage: Usage:
npm install -g migrate-mongo
cd stack/mongo
Apply:
DBURL="mongodb://<user>:<pass>@<host>:<port>/ps2alerts" migrate-mongo up
Revert:DBURL="mongodb://<user>:<pass>@<host>:<port>/ps2alerts" migrate-mongo down