UNPKG

@fdm-monster/server

Version:

FDM Monster is a bulk OctoPrint, Klipper, PrusaLink and BambuLab manager to set up, configure and monitor 3D printers. Our aim is to provide neat overview over your farm.

81 lines (80 loc) 2.49 kB
//#region src/migrations/1767352862576-DropSettingsFileClean.ts var DropSettingsFileClean1767352862576 = class { name = "DropSettingsFileClean1767352862576"; async up(queryRunner) { await queryRunner.query(` CREATE TABLE "temporary_settings" ( "id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "server" text NOT NULL, "credentials" text NOT NULL, "wizard" text NOT NULL, "frontend" text NOT NULL, "timeout" text NOT NULL ) `); await queryRunner.query(` INSERT INTO "temporary_settings"( "id", "server", "credentials", "wizard", "frontend", "timeout" ) SELECT "id", "server", "credentials", "wizard", "frontend", "timeout" FROM "settings" `); await queryRunner.query(` DROP TABLE "settings" `); await queryRunner.query(` ALTER TABLE "temporary_settings" RENAME TO "settings" `); } async down(queryRunner) { await queryRunner.query(` ALTER TABLE "settings" RENAME TO "temporary_settings" `); await queryRunner.query(` CREATE TABLE "settings" ( "id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "server" text NOT NULL, "credentials" text NOT NULL, "wizard" text NOT NULL, "printerFileClean" text NOT NULL, "frontend" text NOT NULL, "timeout" text NOT NULL ) `); await queryRunner.query(` INSERT INTO "settings"( "id", "server", "credentials", "wizard", "frontend", "timeout" ) SELECT "id", "server", "credentials", "wizard", "frontend", "timeout" FROM "temporary_settings" `); await queryRunner.query(` DROP TABLE "temporary_settings" `); } }; //#endregion export { DropSettingsFileClean1767352862576 }; //# sourceMappingURL=1767352862576-DropSettingsFileClean.js.map