gancio-upstream/server/migrations/20191027130750-create-instances.js
2019-10-30 15:01:15 +01:00

32 lines
669 B
JavaScript

'use strict'
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.createTable('instances', {
domain: {
allowNull: false,
primaryKey: true,
type: Sequelize.STRING
},
name: {
type: Sequelize.STRING
},
blocked: {
type: Sequelize.BOOLEAN
},
data: {
type: Sequelize.JSON
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
})
},
down: (queryInterface, Sequelize) => {
return queryInterface.dropTable('instances')
}
}