{"size": 1076, "ext": "js", "max_stars_repo_path": "api/migrations/20210314032752-create-feature-request.js", "max_stars_repo_name": "HGTP/hgtp-capstone", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "api/migrations/20210314032752-create-feature-request.js", "max_issues_repo_name": "HGTP/hgtp-capstone", "max_issues_repo_issues_event_min_datetime": "2021-04-21T03:00:06.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-04T00:44:22.000Z", "max_forks_repo_path": "api/migrations/20210314032752-create-feature-request.js", "max_forks_repo_name": "HGTP/hgtp-capstone", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 4, "max_forks_count": null, "avg_line_length": 23.3913043478, "max_line_length": 67, "alphanum_fraction": 0.5734200743}
'use strict';

const FEATURE_REQUESTS_TABLE_NAME = 'FeatureRequests';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    await queryInterface.createTable(FEATURE_REQUESTS_TABLE_NAME, {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      description: {
        allowNull: false,
        type: Sequelize.STRING,
      },
      requestorId: {
        allowNull: false,
        type: Sequelize.STRING,
      },
      status: {
        defaultValue: 'unplanned',
        type: Sequelize.ENUM,
        values: ['unplanned', 'planned', 'completed'],
      },
      tags: {
        allowNull: true,
        type: Sequelize.STRING,
      },
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
      updatedAt: {
        allowNull: false,
        type: Sequelize.DATE
      }
    });
  },
  
  // Add Sequelize as second parameter if needed.
  down: async (queryInterface) => {
    await queryInterface.dropTable(FEATURE_REQUESTS_TABLE_NAME);
  }
};