Total Complexity | 2 |
Total Lines | 14 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import {MigrationInterface, QueryRunner} from "typeorm"; |
||
2 | |||
3 | export class ShootingDates1622383660612 implements MigrationInterface { |
||
4 | name = 'ShootingDates1622383660612' |
||
5 | |||
6 | public async up(queryRunner: QueryRunner): Promise<void> { |
||
7 | await queryRunner.query(`ALTER TABLE "shooting" DROP COLUMN "closingDate"`); |
||
8 | await queryRunner.query(`ALTER TABLE "shooting" ADD "groupClosingDate" date NOT NULL`); |
||
9 | await queryRunner.query(`ALTER TABLE "shooting" ADD "individualClosingDate" date NOT NULL`); |
||
10 | } |
||
11 | |||
12 | public async down(queryRunner: QueryRunner): Promise<void> { |
||
13 | await queryRunner.query(`ALTER TABLE "shooting" DROP COLUMN "individualClosingDate"`); |
||
14 | await queryRunner.query(`ALTER TABLE "shooting" DROP COLUMN "groupClosingDate"`); |
||
15 | await queryRunner.query(`ALTER TABLE "shooting" ADD "closingDate" date NOT NULL`); |
||
16 | } |
||
19 |