Skip to content

Commit 3b96870

Browse files
authored
fix: deletedAt not set for offline assets during 1.116.0 migration (#13086)
1 parent 67aa124 commit 3b96870

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { MigrationInterface, QueryRunner } from "typeorm";
2+
3+
export class IsOfflineSetDeletedAt1727781844613 implements MigrationInterface {
4+
5+
public async up(queryRunner: QueryRunner): Promise<void> {
6+
await queryRunner.query(
7+
`UPDATE assets SET "deletedAt" = now() WHERE "isOffline" = true AND "deletedAt" IS NULL`,
8+
);
9+
}
10+
11+
public async down(queryRunner: QueryRunner): Promise<void> {
12+
await queryRunner.query(
13+
`UPDATE assets SET "deletedAt" = null WHERE "isOffline" = true`,
14+
);
15+
}
16+
}

0 commit comments

Comments
 (0)