%PDF- %PDF-
| Direktori : /home/opti/workflow/src/migrations/ |
| Current File : /home/opti/workflow/src/migrations/20190220123639-create-organization.js |
'use strict';
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.createTable('Organizations', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
name: {
type: Sequelize.STRING
},
description: {
type: Sequelize.STRING
},
address: {
type: Sequelize.STRING
},
city: {
type: Sequelize.STRING
},
state: {
type: Sequelize.STRING
},
country: {
type: Sequelize.STRING
},
postalCode: {
type: Sequelize.STRING
},
email: {
type: Sequelize.STRING
},
phone: {
type: Sequelize.STRING
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
},
createdBy: {
type: Sequelize.INTEGER
},
updatedBy: {
type: Sequelize.INTEGER
}
});
},
down: (queryInterface, Sequelize) => {
return queryInterface.dropTable('Organizations');
}
};