'use strict';
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('transactions', {
      id: {
        type: Sequelize.BIGINT,
        primaryKey: true,
        autoIncrement: true
      },
      itemCategoryId: {
        type: Sequelize.BIGINT,
        defaultValue: 1,
        default: 1,
        allowNull: false
      },
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
      updatedAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
      text: {
        type: Sequelize.TEXT,
        allowNull: false,
      },
      UserId: {
        type: Sequelize.BIGINT,
      },
      boughtFromId: {
        type: Sequelize.TEXT,
      },
      limited: {
        type: Sequelize.BOOLEAN,
        defaultValue: 0,
        default: 0
      },
      priceOfPurchase: {
        type: Sequelize.BIGINT
      },
      team: {
        type: Sequelize.BOOLEAN,
        default: false
      },
      teamId: {
        type: Sequelize.BIGINT,
        default: 0
      },
      itemId: {
        type: Sequelize.BIGINT
      }
    });
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('transactions');
  }
};