import { MigrationInterface , QueryRunner } from "typeorm" ; export class MatchCreatedAt1605410540874 implements MigrationInterface { name = 'MatchCreatedAt1605410540874' ; public async up ( queryRunner ) { await queryRunner . query ( `ALTER TABLE "match" ADD "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()` ) ; await queryRunner . query ( `COMMENT ON COLUMN "user"."codeImgIds" IS NULL` ) ; await queryRunner . query ( `ALTER TABLE "user" ALTER COLUMN "codeImgIds" SET DEFAULT '{}'::text[]` ) ; } public async down ( queryRunner ) { await queryRunner . query ( `ALTER TABLE "user" ALTER COLUMN "codeImgIds" SET DEFAULT '{}'` ) ; await queryRunner . query ( `COMMENT ON COLUMN "user"."codeImgIds" IS NULL` ) ; await queryRunner . query ( `ALTER TABLE "match" DROP COLUMN "createdAt"` ) ; } }