All files / projects-dev/apps/mc-api/src/migrations 1639038098275-AddSinisterMotivesElements.ts

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

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 20 21 22 23 24 25                                                 
import { MigrationInterface, QueryRunner } from "typeorm";

export class AddSinisterMotivesElements1639038098275 implements MigrationInterface {
    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`
            REPLACE INTO heroes (id, name, alterEgo, aspects, packCode) VALUES
            (40, 'Ghost-Spider', 'Gwen Stacy', 'Protection', 'MC027'),
            (41, 'Spider-Man', 'Miles Morales', 'Justice', 'MC027');
        `);

        await queryRunner.query(`
            REPLACE INTO scenarios VALUES
            (27, 'Sandman', 'MC027'),
            (28, 'Venom - Leave Us Alone!', 'MC027'),
            (29, 'Mysterio - Maze of Mirrors', 'MC027'),
            (30, 'Sinister Six - Sinister Synchronization', 'MC027')
        `);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`DELETE FROM heroes WHERE packCode='MC027'`);
        await queryRunner.query(`DELETE FROM scenarios WHERE packCode='MC027'`);
    }
}