@@ -1,26 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
up: (queryInterface, Sequelize) => {
|
||||
/*
|
||||
Add altering commands here.
|
||||
Return a promise to correctly handle asynchronicity.
|
||||
|
||||
Example:
|
||||
return queryInterface.createTable('users', { id: Sequelize.INTEGER });
|
||||
*/
|
||||
return queryInterface.addColumn('EventNotifications', 'status',
|
||||
{ type: Sequelize.ENUM, values: ['new', 'sent', 'error'], index: true, defaultValue: 'new' })
|
||||
// return queryInterface.addColumn('EventNotifications', 'status',
|
||||
// { type: Sequelize.ENUM, values: ['new', 'sent', 'error'], index: true, defaultValue: 'new' })
|
||||
},
|
||||
|
||||
down: (queryInterface, Sequelize) => {
|
||||
/*
|
||||
Add reverting commands here.
|
||||
Return a promise to correctly handle asynchronicity.
|
||||
|
||||
Example:
|
||||
return queryInterface.dropTable('users');
|
||||
*/
|
||||
return queryInterface.removeColumn('EventNotifications', 'status')
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
10
app/migrations/20190321163240-recover_code.js
Normal file
10
app/migrations/20190321163240-recover_code.js
Normal file
@@ -0,0 +1,10 @@
|
||||
module.exports = {
|
||||
up: (queryInterface, Sequelize) => {
|
||||
return queryInterface.addColumn('users', 'recover_code',
|
||||
{ type: Sequelize.STRING })
|
||||
},
|
||||
|
||||
down: (queryInterface, Sequelize) => {
|
||||
return queryInterface.removeColumn('users', 'recover_code')
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user