api/migrations/20181002073641-create-veget...
2018-10-02 19:18:05 +02:00

33 lines
714 B
JavaScript

module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.createTable('vegetableProperties', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
vegetableId: {
type: Sequelize.INTEGER
},
propertyId: {
type: Sequelize.INTEGER
},
value: {
type: Sequelize.TEXT
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
})
},
down: (queryInterface, Sequelize) => {
return queryInterface.dropTable('vegetableProperties')
}
}