add(migration): add two new columns to user for ID Check

This commit is contained in:
Marie 2024-08-19 07:19:25 +02:00
parent 531e4a43ad
commit a56066ce53
No known key found for this signature in database
GPG Key ID: 56569BBE47D2C828
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,18 @@
/*
* SPDX-FileCopyrightText: marie and other Sharkey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export class idCheck1724044488000 {
name = 'idCheck1724044488000';
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "user" ADD "idCheckRequired" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`ALTER TABLE "user" ADD "idVerified" boolean NOT NULL DEFAULT false`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "idCheckRequired"`);
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "idVerified"`);
}
}

View File

@ -108,6 +108,8 @@ type Source = {
maxFileSize: number; maxFileSize: number;
}; };
stripeverify?: boolean;
pidFile: string; pidFile: string;
}; };
@ -197,6 +199,8 @@ export type Config = {
maxFileSize: number; maxFileSize: number;
} | undefined; } | undefined;
stripeverify: boolean | undefined;
pidFile: string; pidFile: string;
}; };
@ -319,6 +323,7 @@ export function loadConfig(): Config {
perUserNotificationsMaxCount: config.perUserNotificationsMaxCount ?? 500, perUserNotificationsMaxCount: config.perUserNotificationsMaxCount ?? 500,
deactivateAntennaThreshold: config.deactivateAntennaThreshold ?? (1000 * 60 * 60 * 24 * 7), deactivateAntennaThreshold: config.deactivateAntennaThreshold ?? (1000 * 60 * 60 * 24 * 7),
import: config.import, import: config.import,
stripeverify: config.stripeverify ?? false,
pidFile: config.pidFile, pidFile: config.pidFile,
}; };
} }