Add sqlite migration for plugin settings

This commit is contained in:
TheArcaneBrony
2022-08-15 14:13:47 +02:00
parent 8769c7625c
commit 1ec2218a60
3 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -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;
@@ -0,0 +1,18 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class syncRebase15aug20221660565540177 implements MigrationInterface {
name = 'syncRebase15aug20221660565540177'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
CREATE TABLE "plugin_config" ("key" varchar PRIMARY KEY NOT NULL, "value" text)
`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
DROP TABLE "plugin_config"
`);
}
}
+1
View File
@@ -25,4 +25,5 @@ export * from "./Token";
export * from "./TraverseDirectory";
export * from "./InvisibleCharacters";
export * from "./Environment";
export * from "./Logo";
export * from "./Paths";