'use strict';

module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('passkey', {
      code: {
        type: Sequelize.STRING(191),
        primaryKey: true,
        required: true
      },
      createdAt: Sequelize.DATE,
      uses: {
        type: Sequelize.BOOLEAN,
        primaryKey: true,
        required: true
      },
       maxUses: {
        type: Sequelize.BOOLEAN,
        primaryKey: true,
        required: true
      }
    }, {
      charset: 'utf8mb4'
    })
  },

  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('passkey');
  }
};