add new lagin desktop

This commit is contained in:
2026-06-11 16:20:46 +03:30
parent ea0860d176
commit d3d61f5e5a
6 changed files with 223 additions and 0 deletions
@@ -0,0 +1,27 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
export class CreatePlatformSettings1789046700000 implements MigrationInterface {
name = 'CreatePlatformSettings1789046700000';
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
CREATE TABLE IF NOT EXISTS "platform_settings" (
"id" smallint NOT NULL DEFAULT 1,
"login_hero_image_url" character varying(500),
"updated_at" TIMESTAMPTZ NOT NULL DEFAULT now(),
CONSTRAINT "PK_platform_settings" PRIMARY KEY ("id"),
CONSTRAINT "CHK_platform_settings_singleton" CHECK ("id" = 1)
)
`);
await queryRunner.query(`
INSERT INTO "platform_settings" ("id")
VALUES (1)
ON CONFLICT ("id") DO NOTHING
`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`DROP TABLE IF EXISTS "platform_settings"`);
}
}