소스 검색

Added migration down for change exif file type

Alex 2 년 전
부모
커밋
87f7b0849a
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      server/libs/database/src/migrations/1661528919411-ChangeExifFileSizeInByteToBigInt.ts

+ 6 - 1
server/libs/database/src/migrations/1661528919411-ChangeExifFileSizeInByteToBigInt.ts

@@ -10,5 +10,10 @@ export class ChangeExifFileSizeInByteToBigInt1661528919411 implements MigrationI
     `);
   }
 
-  public async down(queryRunner: QueryRunner): Promise<void> {}
+  public async down(queryRunner: QueryRunner): Promise<void> {
+    await queryRunner.query(`
+    ALTER TABLE exif
+    ALTER COLUMN "fileSizeInByte" type integer using "fileSizeInByte"::integer;
+  `);
+  }
 }