All files / projects-dev/apps/mc-api/src/migrations 1642982754432-Add2022LeakedPacks.ts

0% Statements 0/18
0% Branches 0/1
0% Functions 0/1
0% Lines 0/18

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19                                     
import { MigrationInterface, QueryRunner } from "typeorm";

export class Add2022LeakedPacks1642982754432 implements MigrationInterface {
    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`
            REPLACE INTO packs VALUES
            ('MC028', 'Nova', 'Hero', '2022-02-14'),
            ('MC029', 'Ironheart', 'Hero', '2022-03-14'),
            ('MC030', 'Spider-Ham', 'Hero', '2022-04-14'),
            ('MC031', 'SP//dr', 'Hero', '2022-05-14'),
            ('MC032', 'Mutant Genesis', 'Expansion', '2022-05-14');
        `);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`DELETE FROM packs WHERE code IN('MC028', 'MC029', 'MC030', 'MC031', 'MC032')`);
    }
}