gancio/server/migrations/20190728213923-add_username.js
2019-07-29 01:27:47 +02:00

29 lines
661 B
JavaScript

'use strict';
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.addColumn('users', 'username', {
type: Sequelize.STRING,
index: true,
allowNull: false,
defaultValue: ''
})
/*
Add altering commands here.
Return a promise to correctly handle asynchronicity.
Example:
return queryInterface.createTable('users', { id: Sequelize.INTEGER });
*/
},
down: (queryInterface, Sequelize) => {
/*
Add reverting commands here.
Return a promise to correctly handle asynchronicity.
Example:
return queryInterface.dropTable('users');
*/
}
};