From 1ec2218a60bef5aeb95eed41b0f10a70a6867841 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Mon, 15 Aug 2022 14:13:47 +0200 Subject: Add sqlite migration for plugin settings --- src/start.ts | 2 +- .../sqlite/1660565540177-sync_rebase_15aug2022.ts | 18 ++++++++++++++++++ src/util/util/index.ts | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/util/migrations/sqlite/1660565540177-sync_rebase_15aug2022.ts (limited to 'src') diff --git a/src/start.ts b/src/start.ts index 9d01ce9c..94cf864e 100644 --- a/src/start.ts +++ b/src/start.ts @@ -8,7 +8,7 @@ import "reflect-metadata"; import { initStats } from "./stats"; config(); import { execSync } from "child_process"; -import { Logo } from "util/util/Logo"; +import { Logo } from "./util"; // TODO: add socket event transmission let cores = 1; diff --git a/src/util/migrations/sqlite/1660565540177-sync_rebase_15aug2022.ts b/src/util/migrations/sqlite/1660565540177-sync_rebase_15aug2022.ts new file mode 100644 index 00000000..665df6c5 --- /dev/null +++ b/src/util/migrations/sqlite/1660565540177-sync_rebase_15aug2022.ts @@ -0,0 +1,18 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class syncRebase15aug20221660565540177 implements MigrationInterface { + name = 'syncRebase15aug20221660565540177' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(` + CREATE TABLE "plugin_config" ("key" varchar PRIMARY KEY NOT NULL, "value" text) + `); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(` + DROP TABLE "plugin_config" + `); + } + +} diff --git a/src/util/util/index.ts b/src/util/util/index.ts index 8135c107..4135f44e 100644 --- a/src/util/util/index.ts +++ b/src/util/util/index.ts @@ -25,4 +25,5 @@ export * from "./Token"; export * from "./TraverseDirectory"; export * from "./InvisibleCharacters"; export * from "./Environment"; +export * from "./Logo"; export * from "./Paths"; \ No newline at end of file -- cgit 1.5.1