mirror of
https://github.com/immich-app/immich.git
synced 2026-05-24 00:22:29 -04:00
chore!: migrate album owner to album_user (#27467)
Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com> Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
@@ -139,7 +139,15 @@ from
|
||||
from
|
||||
"user"
|
||||
where
|
||||
"user"."id" = "album"."ownerId"
|
||||
exists (
|
||||
select
|
||||
from
|
||||
"album_user"
|
||||
where
|
||||
"album_user"."role" = 'owner'
|
||||
and "album_user"."albumId" = "album"."id"
|
||||
and "album_user"."userId" = "user"."id"
|
||||
)
|
||||
and "user"."deletedAt" is null
|
||||
) as "owner" on true
|
||||
where
|
||||
@@ -201,7 +209,15 @@ from
|
||||
from
|
||||
"user"
|
||||
where
|
||||
"user"."id" = "album"."ownerId"
|
||||
exists (
|
||||
select
|
||||
from
|
||||
"album_user"
|
||||
where
|
||||
"album_user"."role" = 'owner'
|
||||
and "album_user"."albumId" = "album"."id"
|
||||
and "album_user"."userId" = "user"."id"
|
||||
)
|
||||
and "user"."deletedAt" is null
|
||||
) as "owner" on true
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user