mirror of
https://github.com/immich-app/immich.git
synced 2025-04-14 12:06:25 +02:00
fix(server): memory lane assets order (#15882)
* fix(server): memory lane assets order * fix: sql * pr feedback * sql
This commit is contained in:
parent
47f6181d42
commit
06f077bac2
2 changed files with 3 additions and 0 deletions
server/src
|
@ -47,6 +47,8 @@ with
|
||||||
and "asset_files"."type" = $6
|
and "asset_files"."type" = $6
|
||||||
)
|
)
|
||||||
and "assets"."deletedAt" is null
|
and "assets"."deletedAt" is null
|
||||||
|
order by
|
||||||
|
(assets."localDateTime" at time zone 'UTC')::date desc
|
||||||
limit
|
limit
|
||||||
$7
|
$7
|
||||||
) as "a" on true
|
) as "a" on true
|
||||||
|
|
|
@ -121,6 +121,7 @@ export class AssetRepository implements IAssetRepository {
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.where('assets.deletedAt', 'is', null)
|
.where('assets.deletedAt', 'is', null)
|
||||||
|
.orderBy(sql`(assets."localDateTime" at time zone 'UTC')::date`, 'desc')
|
||||||
.limit(20)
|
.limit(20)
|
||||||
.as('a'),
|
.as('a'),
|
||||||
(join) => join.onTrue(),
|
(join) => join.onTrue(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue