mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-13 09:17:30 -05:00
First Commit
This commit is contained in:
16
admin/upgrade_db_admin.js
Normal file
16
admin/upgrade_db_admin.js
Normal file
@@ -0,0 +1,16 @@
|
||||
db = db.getMongo().getDB( "scanner" );
|
||||
|
||||
db.users.find().forEach(
|
||||
function(user){
|
||||
|
||||
db.systems.updateMany(
|
||||
{ "user": { $eq: user.email } },
|
||||
{
|
||||
$set: { "userId": user._id, "showDisplayName": false },
|
||||
}
|
||||
);
|
||||
|
||||
print("Upgrading: " + user.email);
|
||||
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user