mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: migrate move repository to kysely (#15327)
* refactor: migrate move repository to kysely * fix: tests * fix: tests
This commit is contained in:
parent
fc99c5f530
commit
a35af2b242
5 changed files with 56 additions and 35 deletions
|
|
@ -1,18 +1,17 @@
|
|||
-- NOTE: This file is auto generated by ./sql-generator
|
||||
|
||||
-- MoveRepository.getByEntity
|
||||
SELECT
|
||||
"MoveEntity"."id" AS "MoveEntity_id",
|
||||
"MoveEntity"."entityId" AS "MoveEntity_entityId",
|
||||
"MoveEntity"."pathType" AS "MoveEntity_pathType",
|
||||
"MoveEntity"."oldPath" AS "MoveEntity_oldPath",
|
||||
"MoveEntity"."newPath" AS "MoveEntity_newPath"
|
||||
FROM
|
||||
"move_history" "MoveEntity"
|
||||
WHERE
|
||||
(
|
||||
("MoveEntity"."entityId" = $1)
|
||||
AND ("MoveEntity"."pathType" = $2)
|
||||
)
|
||||
LIMIT
|
||||
1
|
||||
select
|
||||
*
|
||||
from
|
||||
"move_history"
|
||||
where
|
||||
"entityId" = $1
|
||||
and "pathType" = $2
|
||||
|
||||
-- MoveRepository.delete
|
||||
delete from "move_history"
|
||||
where
|
||||
"id" = $1
|
||||
returning
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue