%PDF- %PDF-
| Direktori : /home/opti/workflow/src/migrations/ |
| Current File : /home/opti/workflow/src/migrations/20190220082242-create-contact.js |
'use strict';
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.createTable('Contacts', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
uuid: {
type: Sequelize.UUID,
defaultValue:Sequelize.UUIDV4
},
contactType: {
type: Sequelize.INTEGER
},
personId: {
allowNull: true,
defaultValue: null,
type: Sequelize.INTEGER
},
groupId: {
allowNull: true,
defaultValue: null,
type: Sequelize.INTEGER
},
orgId: {
type: Sequelize.INTEGER
},
description: {
type: Sequelize.TEXT
},
username: {
allowNull: true,
type: Sequelize.TEXT
},
passwordd: {
allowNull: true,
type: Sequelize.TEXT
},
partyRole: {
type: Sequelize.INTEGER
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: true,
type: Sequelize.DATE
}
});
},
down: (queryInterface, Sequelize) => {
return queryInterface.dropTable('Contacts');
}
};