From f54a45256bc4adead4ea193a7f967011dd2c17d0 Mon Sep 17 00:00:00 2001 From: William Oldham Date: Sat, 11 Nov 2023 16:05:06 +0000 Subject: [PATCH] =?UTF-8?q?Format=20migrations=20to=20be=20=E2=9C=A8=20pre?= =?UTF-8?q?tty=20=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/db/migrations/Migration20231111160045.ts | 22 +++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/db/migrations/Migration20231111160045.ts b/src/db/migrations/Migration20231111160045.ts index 83c42c2..866fc12 100644 --- a/src/db/migrations/Migration20231111160045.ts +++ b/src/db/migrations/Migration20231111160045.ts @@ -1,17 +1,25 @@ import { Migration } from '@mikro-orm/migrations'; export class Migration20231111160045 extends Migration { - async up(): Promise { - this.addSql('alter table "provider_metrics" add column "hostname" varchar(255) not null;'); - this.addSql('alter table "provider_metrics" alter column "error_message" type text using ("error_message"::text);'); - this.addSql('alter table "provider_metrics" alter column "full_error" type text using ("full_error"::text);'); + this.addSql( + 'alter table "provider_metrics" add column "hostname" varchar(255) not null;', + ); + this.addSql( + 'alter table "provider_metrics" alter column "error_message" type text using ("error_message"::text);', + ); + this.addSql( + 'alter table "provider_metrics" alter column "full_error" type text using ("full_error"::text);', + ); } async down(): Promise { - this.addSql('alter table "provider_metrics" alter column "error_message" type varchar(255) using ("error_message"::varchar(255));'); - this.addSql('alter table "provider_metrics" alter column "full_error" type varchar(255) using ("full_error"::varchar(255));'); + this.addSql( + 'alter table "provider_metrics" alter column "error_message" type varchar(255) using ("error_message"::varchar(255));', + ); + this.addSql( + 'alter table "provider_metrics" alter column "full_error" type varchar(255) using ("full_error"::varchar(255));', + ); this.addSql('alter table "provider_metrics" drop column "hostname";'); } - }