Migrating users without lang
This commit is contained in:
parent
dfed8d3a74
commit
add5dedcb1
1 changed files with 14 additions and 1 deletions
|
|
@ -104,8 +104,21 @@ Meteor.startup(() => {
|
|||
}
|
||||
});
|
||||
|
||||
Migrations.add({
|
||||
version: 7,
|
||||
up: function defLangIfNull() {
|
||||
Meteor.users.find({ lang: null }).forEach((user) => {
|
||||
Meteor.users.update({ _id: user._id }, {
|
||||
$set: {
|
||||
lang: 'es'
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Set createdAt in users & subs
|
||||
Migrations.migrateTo('latest');
|
||||
|
||||
// Migrations.migrateTo('5,rerun');
|
||||
// Migrations.migrateTo('7,rerun');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue