-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #234 from d-rec/DR-797
DR-797 Migration file for old issuer certificates
- Loading branch information
Showing
2 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
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,29 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
export class OldIssuerLog1715146626520 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
//IMPORTANT NOTE: We have generated this entity to have a backup of our old certificate logs | ||
//generated before upgraded the @energyweb/issuer-api... because the old certificate logs are | ||
//not compatible with newly upgraded issuer-certificates struture.. | ||
await queryRunner.query(` | ||
CREATE TABLE old_issuer_certificate ( | ||
"createdAt" timestamp with time zone NOT NULL DEFAULT now(), | ||
"updatedAt" timestamp with time zone NOT NULL DEFAULT now(), | ||
"id" SERIAL NOT NULL, | ||
"deviceId" character varying NOT NULL, | ||
"generationStartTime" integer NOT NULL, | ||
"generationEndTime" integer NOT NULL, | ||
"creationTime" integer NOT NULL, | ||
"creationBlockHash" character varying, | ||
"owners" text NOT NULL, | ||
"claimers" text, | ||
"claims" text, | ||
"latestCommitment" text, | ||
"issuedPrivately" boolean NOT NULL, | ||
"blockchainNetId" integer, | ||
"metadata" character varying NOT NULL, | ||
)`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> {} | ||
} |
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