Skip to content

Commit

Permalink
fix: X years ago ordering (immich-app#13742)
Browse files Browse the repository at this point in the history
* fix: order by fileCreatedAt to account for tz

* run make sql
  • Loading branch information
darrelhong authored and yosit committed Oct 29, 2024
1 parent 71bd3d7 commit 40c0e38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/src/queries/asset.repository.sql
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ WHERE
)
AND ("entity"."deletedAt" IS NULL)
ORDER BY
"entity"."localDateTime" ASC
"entity"."fileCreatedAt" ASC

-- AssetRepository.getByIds
SELECT
Expand Down
2 changes: 1 addition & 1 deletion server/src/repositories/asset.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class AssetRepository implements IAssetRepository {
)
.leftJoinAndSelect('entity.exifInfo', 'exifInfo')
.leftJoinAndSelect('entity.files', 'files')
.orderBy('entity.localDateTime', 'ASC')
.orderBy('entity.fileCreatedAt', 'ASC')
.getMany();
}

Expand Down

0 comments on commit 40c0e38

Please sign in to comment.