import { MigrationInterface, QueryRunner } from 'typeorm';

export class updateVersionTable1655827378126 implements MigrationInterface {
  name = 'updateVersionTable1655827378126';

  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `CREATE TABLE \`versions\` ( \`id\` INT NOT NULL AUTO_INCREMENT , \`version\` VARCHAR(45) NOT NULL , \`type\` ENUM('android','ios','web') NOT NULL , \`description\` VARCHAR(255) NULL , \`updateUrl\` VARCHAR(255) NULL , \`isForced\` TINYINT(1) NOT NULL DEFAULT '0' , \`isReviewing\` TINYINT(1) NOT NULL DEFAULT '0' , \`createdAt\` DATETIME NOT NULL , \`updatedAt\` DATETIME NULL , PRIMARY KEY (\`id\`))`,
    );
  }

  public async down(queryRunner: QueryRunner): Promise<void> {
    //
  }
}
