From 04dea8d788acfaf485f4aa9ad255e39f6aac2a08 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Sat, 20 Aug 2022 03:27:03 +0200 Subject: prettier --- .../sqlite/1660538628956-sync_migrations.ts | 27 +++++++++++----------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'src/util/migrations/sqlite/1660538628956-sync_migrations.ts') diff --git a/src/util/migrations/sqlite/1660538628956-sync_migrations.ts b/src/util/migrations/sqlite/1660538628956-sync_migrations.ts index 9cdc064f..95c59d28 100644 --- a/src/util/migrations/sqlite/1660538628956-sync_migrations.ts +++ b/src/util/migrations/sqlite/1660538628956-sync_migrations.ts @@ -1,10 +1,10 @@ import { MigrationInterface, QueryRunner } from "typeorm"; export class syncMigrations1660538628956 implements MigrationInterface { - name = 'syncMigrations1660538628956' + name = "syncMigrations1660538628956"; - public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query(` + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(` CREATE TABLE "temporary_channels" ( "id" varchar PRIMARY KEY NOT NULL, "created_at" datetime NOT NULL, @@ -33,7 +33,7 @@ export class syncMigrations1660538628956 implements MigrationInterface { CONSTRAINT "FK_c253dafe5f3a03ec00cd8fb4581" FOREIGN KEY ("guild_id") REFERENCES "guilds" ("id") ON DELETE CASCADE ON UPDATE NO ACTION ) `); - await queryRunner.query(` + await queryRunner.query(` INSERT INTO "temporary_channels"( "id", "created_at", @@ -78,21 +78,21 @@ export class syncMigrations1660538628956 implements MigrationInterface { "retention_policy_id" FROM "channels" `); - await queryRunner.query(` + await queryRunner.query(` DROP TABLE "channels" `); - await queryRunner.query(` + await queryRunner.query(` ALTER TABLE "temporary_channels" RENAME TO "channels" `); - } + } - public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query(` + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(` ALTER TABLE "channels" RENAME TO "temporary_channels" `); - await queryRunner.query(` + await queryRunner.query(` CREATE TABLE "channels" ( "id" varchar PRIMARY KEY NOT NULL, "created_at" datetime NOT NULL, @@ -119,7 +119,7 @@ export class syncMigrations1660538628956 implements MigrationInterface { CONSTRAINT "FK_c253dafe5f3a03ec00cd8fb4581" FOREIGN KEY ("guild_id") REFERENCES "guilds" ("id") ON DELETE CASCADE ON UPDATE NO ACTION ) `); - await queryRunner.query(` + await queryRunner.query(` INSERT INTO "channels"( "id", "created_at", @@ -164,9 +164,8 @@ export class syncMigrations1660538628956 implements MigrationInterface { "retention_policy_id" FROM "temporary_channels" `); - await queryRunner.query(` + await queryRunner.query(` DROP TABLE "temporary_channels" `); - } - + } } -- cgit 1.5.1