api/migrations/20181002073641-create-vegetable-properties.js

33 lines
714 B
JavaScript
Raw Normal View History

2018-10-02 19:18:05 +02:00
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')
}
}