{"size": 1659, "ext": "js", "max_stars_repo_path": "db/migrations/20190602215456-create-property.js", "max_stars_repo_name": "RomuloDevelop/RealtyServer", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "db/migrations/20190602215456-create-property.js", "max_issues_repo_name": "RomuloDevelop/RealtyServer", "max_issues_repo_issues_event_min_datetime": "2021-05-09T21:35:51.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-09T21:35:51.000Z", "max_forks_repo_path": "db/migrations/20190602215456-create-property.js", "max_forks_repo_name": "RomuloDevelop/RealtyServer", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 21.0, "max_line_length": 53, "alphanum_fraction": 0.5015069319}
'use strict';
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('Properties', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      price: {
        type: Sequelize.FLOAT
      },
      bedroom: {
        type: Sequelize.INTEGER
      },
      bath: {
        type: Sequelize.FLOAT
      },
      size: {
        type: Sequelize.INTEGER
      },
      pool: {
        type: Sequelize.BOOLEAN
      },
      foreclosure: {
        type: Sequelize.BOOLEAN
      },
      status: {
        allowNull: false, 
        type: Sequelize.ENUM('active', 'inactive'),
        defaultValue: 'active'
      },
      description: {
        type: Sequelize.STRING
      },
      year_built: {
        type: Sequelize.DATE
      },
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE,
        defaultValue: new Date()
      },
      updatedAt: {
        allowNull: false,
        type: Sequelize.DATE,
        defaultValue: new Date()
      },
      country: {
        type: Sequelize.STRING
      },
      state: {
        type: Sequelize.STRING
      },
      city: {
        type: Sequelize.STRING
      },
      description_es: {
        type: Sequelize.TEXT
      },
      latitude: {
        type: Sequelize.FLOAT
      },
      longitude: {
        type: Sequelize.FLOAT
      },
      address: {
        type: Sequelize.STRING
      },
      pictures_order: {
        type: Sequelize.STRING
      }
    });
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('Properties');
  }
};