text: "use strict";
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = void 0;
  
  var _typeorm = require("typeorm");
  
  class CreateUserTokens1595534869682 {
    async up(queryRunner) {
      await queryRunner.createTable(new _typeorm.Table({
        name: 'user_tokens',
        columns: [{
          name: 'id',
          type: 'uuid',
          isPrimary: true,
          generationStrategy: 'uuid',
          default: 'uuid_generate_v4()'
        }, {
          name: 'token',
          type: 'uuid',
          generationStrategy: 'uuid',
          default: 'uuid_generate_v4()'
        }, {
          name: 'user_id',
          type: 'uuid'
        }, {
          name: 'created_at',
          type: 'timestamp',
          default: 'now()'
        }, {
          name: 'updated_at',
          type: 'timestamp',
          default: 'now()'
        }],
        foreignKeys: [{
          name: 'TokenUser',
          referencedTableName: 'users',
          referencedColumnNames: ['id'],
          columnNames: ['user_id'],
          onDelete: 'Cascade',
          onUpdate: 'Cascade'
        }]
      }));
    }
  
    async down(queryRunner) {
      await queryRunner.dropTable('user_tokens');
    }
  
  }
  
  exports.default = CreateUserTokens1595534869682;