changing the type of org desc and project desc to text

This commit is contained in:
Arjun Patel
2019-05-14 23:06:26 -07:00
parent 09375ba958
commit e46bd0f52a
3 changed files with 45 additions and 2 deletions
@@ -0,0 +1,43 @@
'use strict';
module.exports = {
up: async (queryInterface, Sequelize) => {
/*
Add altering commands here.
Return a promise to correctly handle asynchronicity.
Example:
return queryInterface.createTable('users', { id: Sequelize.INTEGER });
*/
return Promise.all([
queryInterface.changeColumn('organizations', 'short_description', {
type: Sequelize.TEXT,
allowNull: false
}),
queryInterface.changeColumn('projects', 'description', {
type: Sequelize.TEXT,
allowNull: false
})
]);
},
down: async (queryInterface, Sequelize) => {
/*
Add reverting commands here.
Return a promise to correctly handle asynchronicity.
Example:
return queryInterface.dropTable('users');
*/
return Promise.all([
queryInterface.changeColumn('organizations', 'short_description', {
type: Sequelize.STRING,
allowNull: false
}),
queryInterface.changeColumn('projects', 'description', {
type: Sequelize.STRING,
allowNull: false
})
]);
}
};