const { default: User } = require('../../built/api/models/user');
const { generate } = require('../../built/crypto_key');

const updates = [];

User.find({}).each(function(user) {
	updates.push(User.update({ _id: user._id }, {
		$set: {
			account: {
				keypair: generate(),
			}
		}
	}));
}).then(function () {
	Promise.all(updates)
}).then(process.exit);

@@ -237,30 +237,25 @@
 %0A%09%09%09
+'
 account
-: %7B%0A%09%09%09%09
+.
 keypair
+'
 : ge
@@ -268,13 +268,8 @@
 (),%0A
-%09%09%09%7D%0A
 %09%09%7D%0A

Fix keypair assignment in a migration script