33 lines
714 B
JavaScript
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')
|
||
|
}
|
||
|
}
|