add new lagin desktop
This commit is contained in:
@@ -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"`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user