module.exports = {
  up(queryInterface, Sequelize) {
    return queryInterface.createTable('Teams', {
      id: {
        type: Sequelize.BIGINT,
        primaryKey: true,
        autoIncrement: true
      },
      username: {
        type: Sequelize.STRING,
        required: true,
        unique: true
      },
      updatedAt: Sequelize.DATE,
      createdAt: Sequelize.DATE,
      name: {
        type: Sequelize.STRING,
        required: true,
        unique: false,
      },
      teamWallOptOut: {
        type: Sequelize.BOOLEAN,
        required: true,
        defaultValue: false
      },
      itemsOptOut: {
        type: Sequelize.BOOLEAN,
        required: true,
        defaultValue: false
      },
      forumEnabled: {
        type: Sequelize.BOOLEAN,
        required: true,
        defaultValue: false
      },
      description: {
        type: Sequelize.TEXT
      },
      banned: {
        type: Sequelize.BOOLEAN,
        defaultValue: false
      },
      banReason: {
        type: Sequelize.TEXT,
        defaultValue: "No reason provided"
      }
    })
  },
  down(queryInterface, Sequelize) {
    return queryInterface.dropTable('StaffApplications', {})
  }
}
