All files / projects-dev/apps/mc-api/src/migrations 1626137272999-HeroesSeed.ts

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

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 26 27 28 29 30 31 32 33 34 35 36 37 38 39                                                                             
import { MigrationInterface, QueryRunner } from "typeorm";

export class HeroesSeed1626137272999 implements MigrationInterface {
    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`
            INSERT INTO heroes (id, name, alterEgo, aspects, packId) VALUES
            (1, 'Spider-Man', 'Peter Parker', 'Justice', 'MC001'),
            (2, 'Captain Marvel', 'Carole Danvers', 'Leadership', 'MC001'),
            (3, 'She-Hulk', 'Jennifer Walters', 'Leadership', 'MC001'),
            (4, 'Iron Man', 'Tony Stark', 'Aggression', 'MC001'),
            (5, 'Black Panther', 'T''Challa', 'Protection', 'MC001'),
            (6, 'Captain America', 'Steve Rogers', 'Leadership', 'MC004'),
            (7, 'Ms. Marvel', 'Kamala Khan', 'Protection', 'MC005'),
            (8, 'Thor', 'Odinson', 'Aggression', 'MC006'),
            (9, 'Black Widow', 'Natasha Romanoff', 'Aggression', 'MC007'),
            (10, 'Doctor Strange', 'Stephen Strange', 'Protection', 'MC008'),
            (11, 'Hulk', 'Bruce Banner', 'Aggression', 'MC009'),
            (12, 'Hawkeye', 'Clint Barton', 'Leadership', 'MC010'),
            (13, 'Spider-Woman', 'Jessica Drew', 'Aggression,Justice', 'MC010'),
            (14, 'Ant-Man', 'Scott Lang', 'Leadership', 'MC012'),
            (15, 'Wasp', 'Nadia Van Dyne', 'Aggression', 'MC013'),
            (16, 'Quicksilver', 'Pietro Maximoff', 'Protection', 'MC014'),
            (17, 'Scarlet Witch', 'Wanda Maximoff', 'Justice', 'MC015'),
            (18, 'Groot', 'Groot', 'Protection', 'MC016'),
            (19, 'Rocket Racoon', 'Rocket Racoon', 'Aggression', 'MC016'),
            (20, 'Star-Lord', 'Peter Quill', 'Leadership', 'MC017'),
            (21, 'Gamora', 'Gamora', 'Aggression,Justice,Protection', 'MC018'),
            (22, 'Drax', 'Drax', 'Protection', 'MC019'),
            (23, 'Venom', 'Flash Thompson', 'Justice', 'MC020')
        `);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`
            TRUNCATE TABLE heroes
        `);
    }
}