mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix(server): skip stacked assets in duplicate detection (#16380)
* skip stacked assets in duplicate detection * update sql * handle stacking after duplicate detection runs
This commit is contained in:
parent
a808b8610e
commit
a708649504
8 changed files with 34 additions and 0 deletions
|
|
@ -0,0 +1,14 @@
|
|||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class UnsetStackedAssetsFromDuplicateStatus1740654480319 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
update assets
|
||||
set "duplicateId" = null
|
||||
where "stackId" is not null`);
|
||||
}
|
||||
|
||||
public async down(): Promise<void> {
|
||||
// No need to revert this migration
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue