src/database/migrations/20201103203921-create-house.js
'use strict';module.exports = {Function `up` has 41 lines of code (exceeds 25 allowed). Consider refactoring. up: async (queryInterface, Sequelize) => { await queryInterface.createTable('Houses', { id: { allowNull: false, autoIncrement: true, primaryKey: true, type: Sequelize.INTEGER }, image: { type: Sequelize.STRING }, description: { type: Sequelize.TEXT }, location: { type: Sequelize.STRING }, bedrooms: { type: Sequelize.INTEGER }, bathrooms: { type: Sequelize.INTEGER }, price: { type: Sequelize.INTEGER }, status: { type: Sequelize.STRING }, userId: { type: Sequelize.INTEGER, allowNull: false, }, createdAt: { allowNull: false, type: Sequelize.DATE }, updatedAt: { allowNull: false, type: Sequelize.DATE } }); }, down: async (queryInterface) => { await queryInterface.dropTable('Houses'); }};