-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update(scripts): update migration scripts to use updateOne #15181
base: release
Are you sure you want to change the base?
update(scripts): update migration scripts to use updateOne #15181
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah we should use more updateOne's more, less Database spam 😬
just one line was off , the rest LGTM
migrations/users/full-stable.js
Outdated
@@ -57,7 +57,7 @@ async function updateUser (user) { | |||
export default async function processUsers () { | |||
const query = { | |||
migration: { $ne: MIGRATION_NAME }, | |||
'auth.local.username': 'SabreTest', | |||
'auth.local.lowerCaseUsername': 'SabreTest', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this intended? or some global replace happened 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was intentional, but I should have changed the username to match. We mainly use that field when we're testing migrations on our test accounts. 😂
Updates to the following migration scripts:
bulk-email.js
full-gear.js
habit_birthday.js
nye.js
pet_group_achievements.js
pi-day
summer_splash_orcas.js
take-this.js
veteran_pet_ladder
I have also done a little bit of code clean-up.
I have tested these scripts locally and they do what they're supposed to do.