Skip to content

Commit

Permalink
add evaluation and fiscal key migration
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarkowsky committed Mar 13, 2024
1 parent 09966bd commit dad5e13
Showing 1 changed file with 19 additions and 0 deletions.
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;');
}
}

0 comments on commit dad5e13

Please sign in to comment.