add migrations for new table, columns and modified column names

This commit is contained in:
Bilal Catic
2019-06-09 11:36:34 +02:00
parent 0a712bf501
commit c021b55c26
4 changed files with 103 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
'use strict';
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.createTable('officeResourceMappings', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
officeSlug: {
allowNull: false,
type: Sequelize.TEXT,
},
officeId: {
allowNull: false,
type: Sequelize.TEXT,
},
resourceSlug: {
allowNull: false,
type: Sequelize.TEXT,
},
resourceId: {
allowNull: false,
type: Sequelize.TEXT,
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
});
},
down: (queryInterface, Sequelize) => {
return queryInterface.dropTable('officeResourceMappings');
}
};