module.exports = { up: (queryInterface, Sequelize) => { return queryInterface.createTable('vegetables', { id: { allowNull: false, autoIncrement: true, primaryKey: true, type: Sequelize.INTEGER }, name: { type: Sequelize.STRING }, mainPicture: { type: Sequelize.STRING }, description: { type: Sequelize.TEXT }, lat: { type: Sequelize.INTEGER }, lng: { type: Sequelize.INTEGER }, vegetableTypeId: { type: Sequelize.INTEGER, references: { model: 'vegetableTypes', key: 'id' } }, createdAt: { allowNull: false, type: Sequelize.DATE }, updatedAt: { allowNull: false, type: Sequelize.DATE } }) }, down: (queryInterface, Sequelize) => { return queryInterface.dropTable('vegetables') } }