Closed chetbox closed 8 years ago
Migrated using script
db = require './db' db.v2.users.scan FilterExpression: 'attribute_type(emails, :set)' ExpressionAttributeValues: ':set': 'SS' .then (resp) -> resp.Items .mapSeries (user) -> new_emails = user.emails.values.reduce (obj, address) -> obj[address] = verified: true primary: true obj , {} console.log user.username, new_emails db.v2.users.update Key: { id: user.id } UpdateExpression: 'SET emails = :emails' ExpressionAttributeValues: ':emails': new_emails .then -> console.log 'Done.'
Migrated using script