fix: album asset sync must sync new assets in a shared album (#20655)

This commit is contained in:
Zack Pollard
2025-08-05 17:53:51 +01:00
committed by GitHub
parent 09a5963eee
commit 02381343ff
19 changed files with 928 additions and 453 deletions
@@ -1,5 +1,5 @@
import { Injectable } from '@nestjs/common';
import { Insertable, Kysely } from 'kysely';
import { Insertable, Kysely, sql } from 'kysely';
import { InjectKysely } from 'nestjs-kysely';
import { DummyValue, GenerateSql } from 'src/decorators';
import { SyncEntityType } from 'src/enum';
@@ -39,4 +39,13 @@ export class SyncCheckpointRepository {
.$if(!!types, (qb) => qb.where('type', 'in', types!))
.execute();
}
@GenerateSql()
getNow() {
return this.db
.selectNoFrom((eb) => [
eb.fn<string>('immich_uuid_v7', [sql.raw<Date>("now() - interval '1 millisecond'")]).as('nowId'),
])
.executeTakeFirstOrThrow();
}
}