refactor: migrate move repository to kysely (#15327)

* refactor: migrate move repository to kysely

* fix: tests

* fix: tests
This commit is contained in:
Alex 2025-01-13 22:22:03 -06:00 committed by GitHub
parent fc99c5f530
commit a35af2b242
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 56 additions and 35 deletions

View file

@ -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
*