Skip to content

Commit

Permalink
fix: remove public. reference in migration sql (#12285)
Browse files Browse the repository at this point in the history
  • Loading branch information
alextran1502 authored and pull[bot] committed Sep 24, 2024
1 parent 2e5e2d7 commit 3b9b2a1
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { MigrationInterface, QueryRunner } from "typeorm";
import { MigrationInterface, QueryRunner } from 'typeorm';

export class RemoveThumbailAtForMissingThumbnails1725327902980 implements MigrationInterface {

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`UPDATE "asset_job_status" j SET "thumbnailAt" = NULL WHERE j."thumbnailAt" IS NOT NULL AND NOT EXISTS ( SELECT 1 FROM public.asset_files f WHERE j."assetId" = f."assetId" AND f."type" = 'thumbnail' AND f."path" IS NOT NULL )`);
}

public async down(): Promise<void> {
// do nothing
}

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`UPDATE "asset_job_status" j SET "thumbnailAt" = NULL WHERE j."thumbnailAt" IS NOT NULL AND NOT EXISTS ( SELECT 1 FROM asset_files f WHERE j."assetId" = f."assetId" AND f."type" = 'thumbnail' AND f."path" IS NOT NULL )`,
);
}

public async down(): Promise<void> {
// do nothing
}
}

0 comments on commit 3b9b2a1

Please # to comment.