mirror of
https://github.com/immich-app/immich.git
synced 2025-06-01 19:19:37 +02:00
* feat: private view * pr feedback * sql generation * feat: visibility column * fix: set visibility value as the same as the still part after unlinked live photos * fix: test * pr feedback
33 lines
846 B
SQL
33 lines
846 B
SQL
-- NOTE: This file is auto generated by ./sql-generator
|
|
|
|
-- ViewRepository.getUniqueOriginalPaths
|
|
select distinct
|
|
substring("assets"."originalPath", $1) as "directoryPath"
|
|
from
|
|
"assets"
|
|
where
|
|
"ownerId" = $2::uuid
|
|
and "visibility" = $3
|
|
and "deletedAt" is null
|
|
and "fileCreatedAt" is not null
|
|
and "fileModifiedAt" is not null
|
|
and "localDateTime" is not null
|
|
|
|
-- ViewRepository.getAssetsByOriginalPath
|
|
select
|
|
"assets".*,
|
|
to_json("exif") as "exifInfo"
|
|
from
|
|
"assets"
|
|
left join "exif" on "assets"."id" = "exif"."assetId"
|
|
where
|
|
"ownerId" = $1::uuid
|
|
and "visibility" = $2
|
|
and "deletedAt" is null
|
|
and "fileCreatedAt" is not null
|
|
and "fileModifiedAt" is not null
|
|
and "localDateTime" is not null
|
|
and "originalPath" like $3
|
|
and "originalPath" not like $4
|
|
order by
|
|
regexp_replace("assets"."originalPath", $5, $6) asc
|