-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add evaluation and fiscal key migration
- Loading branch information
1 parent
09966bd
commit dad5e13
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
express-api/src/typeorm/Migrations/1710351144794-EvaluationFiscalKeys.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
export class EvaluationFiscalKeys1710351144794 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query('UPDATE fiscal_key SET id = 0 where id = 1;'); | ||
await queryRunner.query('UPDATE fiscal_key SET id = 1 where id = 2;'); | ||
await queryRunner.query('UPDATE evaluation_key SET id = 0 where id = 1;'); | ||
await queryRunner.query('UPDATE evaluation_key SET id = 1 where id = 2;'); | ||
await queryRunner.query('UPDATE evaluation_key SET id = 2 where id = 3;'); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query('UPDATE fiscal_key SET id = 2 where id = 1;'); | ||
await queryRunner.query('UPDATE fiscal_key SET id = 1 where id = 0;'); | ||
await queryRunner.query('UPDATE evaluation_key SET id = 3 where id = 2;'); | ||
await queryRunner.query('UPDATE evaluation_key SET id = 2 where id = 1;'); | ||
await queryRunner.query('UPDATE evaluation_key SET id = 1 where id = 0;'); | ||
} | ||
} |