"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "DropSettingsFileClean1767352862576", {
    enumerable: true,
    get: function() {
        return DropSettingsFileClean1767352862576;
    }
});
class DropSettingsFileClean1767352862576 {
    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"
        `);
    }
}

//# sourceMappingURL=1767352862576-DropSettingsFileClean.js.map