mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat: backfill album users (#19234)
This commit is contained in:
parent
65e8d75e82
commit
e0144b4ece
14 changed files with 232 additions and 24 deletions
|
|
@ -394,6 +394,35 @@ where
|
|||
order by
|
||||
"id" asc
|
||||
|
||||
-- SyncRepository.getAlbumBackfill
|
||||
select
|
||||
"albumsId" as "id",
|
||||
"createId"
|
||||
from
|
||||
"albums_shared_users_users"
|
||||
where
|
||||
"usersId" = $1
|
||||
and "createId" >= $2
|
||||
and "createdAt" < now() - interval '1 millisecond'
|
||||
order by
|
||||
"createId" asc
|
||||
|
||||
-- SyncRepository.getAlbumUsersBackfill
|
||||
select
|
||||
"albums_shared_users_users"."albumsId" as "albumId",
|
||||
"albums_shared_users_users"."usersId" as "userId",
|
||||
"albums_shared_users_users"."role",
|
||||
"albums_shared_users_users"."updateId"
|
||||
from
|
||||
"albums_shared_users_users"
|
||||
where
|
||||
"albumsId" = $1
|
||||
and "updatedAt" < now() - interval '1 millisecond'
|
||||
and "updateId" < $2
|
||||
and "updateId" >= $3
|
||||
order by
|
||||
"updateId" asc
|
||||
|
||||
-- SyncRepository.getAlbumUserUpserts
|
||||
select
|
||||
"albums_shared_users_users"."albumsId" as "albumId",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue