1 import * as Sequelize from 'sequelize'
2 import * as Promise from 'bluebird'
3 import { Migration } from '../../models/migrations'
6 transaction: Sequelize.Transaction,
7 queryInterface: Sequelize.QueryInterface,
8 sequelize: Sequelize.Sequelize
10 const q = utils.queryInterface
13 type: Sequelize.STRING(400),
17 return q.addColumn('Users', 'email', data)
19 const query = 'UPDATE "Users" SET "email" = CONCAT("username", \'@example.com\')'
20 return utils.sequelize.query(query, { transaction: utils.transaction })
23 data.defaultValue = null
25 return q.changeColumn('Users', 'email', data)
29 function down (options) {
30 throw new Error('Not implemented.')