Skip to content

Commit

Permalink
make contract conditional task optional
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarkowsky committed Sep 9, 2024
1 parent bbfe2af commit 7c66e9f
Showing 1 changed file with 22 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,37 @@ import { MigrationInterface, QueryRunner } from 'typeorm';
export class UpdateTaskStatus1724686432998 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
UPDATE task SET status_id = 14 WHERE id = 3;
`);
UPDATE task SET status_id = 14 WHERE id = 3;
`);
await queryRunner.query(`
UPDATE task SET status_id = 15 WHERE id = 4;
`);
UPDATE task SET status_id = 15 WHERE id = 4;
`);
await queryRunner.query(`
UPDATE timestamp_type SET status_id = 21, is_optional = false WHERE id = 11;
`);
UPDATE task SET is_optional = true WHERE id = 24;
`);
await queryRunner.query(`
UPDATE task SET name = 'Preparation and Due Diligence complete', is_optional = false WHERE id IN (9, 19);
`);
UPDATE timestamp_type SET status_id = 21, is_optional = false WHERE id = 11;
`);
await queryRunner.query(`
UPDATE task SET name = 'Preparation and Due Diligence complete', is_optional = false WHERE id IN (9, 19);
`);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
UPDATE task SET status_id = 7 WHERE id = 3;
`);
UPDATE task SET status_id = 7 WHERE id = 3;
`);
await queryRunner.query(`
UPDATE task SET status_id = 8 WHERE id = 4;
`);
await queryRunner.query(`
UPDATE task SET status_id = 8 WHERE id = 4;
`);
UPDATE task SET is_optional = false WHERE id = 24;
`);
await queryRunner.query(`
UPDATE timestamp_type SET status_id = 14, is_optional = true WHERE id = 11;
`);
UPDATE timestamp_type SET status_id = 14, is_optional = true WHERE id = 11;
`);
await queryRunner.query(`
UPDATE task SET name = 'Preparation and due diligence', is_optional = true WHERE id IN (9, 19);
`);
UPDATE task SET name = 'Preparation and due diligence', is_optional = true WHERE id IN (9, 19);
`);
}
}

0 comments on commit 7c66e9f

Please sign in to comment.