{"size": 1721, "ext": "js", "max_stars_repo_path": "migrations/20181221115609-create-nideshop_category-table.js", "max_stars_repo_name": "xianengqi/hapi-shops-nodejs", "max_stars_repo_stars_event_min_datetime": "2018-12-28T07:33:45.000Z", "max_stars_repo_stars_event_max_datetime": "2020-05-25T13:11:45.000Z", "max_issues_repo_path": "migrations/20181221115609-create-nideshop_category-table.js", "max_issues_repo_name": "xianengqi/hapi-shops-nodejs", "max_issues_repo_issues_event_min_datetime": "2019-11-13T06:47:09.000Z", "max_issues_repo_issues_event_max_datetime": "2019-11-25T06:13:46.000Z", "max_forks_repo_path": "migrations/20181221115609-create-nideshop_category-table.js", "max_forks_repo_name": "xianengqi/hapi-shops-nodejs", "max_forks_repo_forks_event_min_datetime": "2019-01-23T15:10:43.000Z", "max_forks_repo_forks_event_max_datetime": "2019-05-09T03:45:01.000Z"}
{"max_stars_count": 5, "max_issues_count": 1, "max_forks_count": 2, "avg_line_length": 21.7848101266, "max_line_length": 71, "alphanum_fraction": 0.5235328298}

module.exports = {
  up: (queryInterface, Sequelize) => queryInterface.createTable(
    'nideshop_category',
    {
      id: {
        type: Sequelize.INTEGER,
        autoIncrement: true,
        primaryKey: true,
      },
      name: {
        type: Sequelize.STRING,
        allowNull: false,
      },
      keywords: {
        type: Sequelize.STRING,
        allowNull: false,
      },
      front_desc: {
        type: Sequelize.STRING,
        allowNull: false,
      },
      parent_id: {
        type: Sequelize.INTEGER,
        allowNull: false,
        defaultValue: true,
      },
      sort_order: {
        type: Sequelize.BOOLEAN,
        allowNull: false,
        defaultValue: true,
      },
      show_index: {
        type: Sequelize.BOOLEAN,
        allowNull: false,
        defaultValue: false,
      },
      is_show: {
        type: Sequelize.BOOLEAN,
        allowNull: false,
        defaultValue: true,
      },
      banner_url: {
        type: Sequelize.STRING,
        allowNull: false,
      },
      icon_url: {
        type: Sequelize.STRING,
        allowNull: false,
      },
      img_url: {
        type: Sequelize.STRING,
        allowNull: false,
      },
      wap_banner_url: {
        type: Sequelize.STRING,
        allowNull: false,
      },
      level: {
        type: Sequelize.STRING,
        allowNull: false,
      },
      type: {
        type: Sequelize.INTEGER,
        allowNull: false,
        defaultValue: true,
      },
      front_name: {
        type: Sequelize.STRING,
        allowNull: false,
      },
      created_at: Sequelize.DATE,
      updated_at: Sequelize.DATE,
    },
  ),

  down: queryInterface => queryInterface.dropTable('nideshop_category')
};
