mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 17:50:54 +00:00
27 lines
847 B
TypeScript
27 lines
847 B
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
/**
|
|
* Track Fayda identity verification on drivers: whether the driver's
|
|
* identity was verified through VeriFayda and the OIDC subject it was
|
|
* verified against.
|
|
*/
|
|
export class AddDriverFaydaVerification1890000000003 implements MigrationInterface {
|
|
name = "AddDriverFaydaVerification1890000000003";
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
ALTER TABLE freight.drivers
|
|
ADD COLUMN IF NOT EXISTS fayda_verified boolean DEFAULT false,
|
|
ADD COLUMN IF NOT EXISTS fayda_sub varchar
|
|
`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`
|
|
ALTER TABLE freight.drivers
|
|
DROP COLUMN IF EXISTS fayda_verified,
|
|
DROP COLUMN IF EXISTS fayda_sub
|
|
`);
|
|
}
|
|
}
|