-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path1693307866605-AcknowledgedByVerifiedIssuer.ts
20 lines (16 loc) · 1.3 KB
/
1693307866605-AcknowledgedByVerifiedIssuer.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { MigrationInterface, QueryRunner } from "typeorm";
export class AcknowledgedByVerifiedIssuer1693307866605 implements MigrationInterface {
name = 'AcknowledgedByVerifiedIssuer1693307866605'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "loc_request_file" RENAME COLUMN "acknowledged_on" TO "acknowledged_by_owner_on"`);
await queryRunner.query(`ALTER TABLE "loc_metadata_item" RENAME COLUMN "acknowledged_on" TO "acknowledged_by_owner_on"`);
await queryRunner.query(`ALTER TABLE "loc_request_file" ADD "acknowledged_by_verified_issuer_on" TIMESTAMP`);
await queryRunner.query(`ALTER TABLE "loc_metadata_item" ADD "acknowledged_by_verified_issuer_on" TIMESTAMP`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "loc_metadata_item" DROP COLUMN "acknowledged_by_verified_issuer_on"`);
await queryRunner.query(`ALTER TABLE "loc_request_file" DROP COLUMN "acknowledged_by_verified_issuer_on"`);
await queryRunner.query(`ALTER TABLE "loc_metadata_item" RENAME COLUMN "acknowledged_by_owner_on" TO "acknowledged_on"`);
await queryRunner.query(`ALTER TABLE "loc_request_file" RENAME COLUMN "acknowledged_by_owner_on" TO "acknowledged_on"`);
}
}