text: 'use strict'
  
  const tableName = 'growth_invite_code'
  
  
  module.exports = {
    up: (queryInterface, Sequelize) => {
      return queryInterface.createTable(tableName, {
        id: {
          allowNull: false,
          autoIncrement: true,
          primaryKey: true,
          type: Sequelize.INTEGER
        },
        eth_address: {
          type: Sequelize.STRING
        },
        code: {
          type: Sequelize.STRING,
          unique: true
        },
        created_at: {
          allowNull: false,
          type: Sequelize.DATE
        },
        updated_at: {
          allowNull: false,
          type: Sequelize.DATE
        }
      }).then(() => queryInterface.addIndex(tableName, ['eth_address']))
    },
    down: (queryInterface) => {
      return queryInterface.dropTable(tableName)
    }
  }