mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: migrate trash to kysely (#15233)
This commit is contained in:
parent
cc6a8b0c74
commit
e51091b6e5
5 changed files with 100 additions and 59 deletions
27
server/src/queries/trash.repository.sql
Normal file
27
server/src/queries/trash.repository.sql
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
-- NOTE: This file is auto generated by ./sql-generator
|
||||
|
||||
-- TrashRepository.restore
|
||||
update "assets"
|
||||
set
|
||||
"status" = $1,
|
||||
"deletedAt" = $2
|
||||
where
|
||||
"ownerId" = $3
|
||||
and "status" = $4
|
||||
|
||||
-- TrashRepository.empty
|
||||
update "assets"
|
||||
set
|
||||
"status" = $1
|
||||
where
|
||||
"ownerId" = $2
|
||||
and "status" = $3
|
||||
|
||||
-- TrashRepository.restoreAll
|
||||
update "assets"
|
||||
set
|
||||
"status" = $1,
|
||||
"deletedAt" = $2
|
||||
where
|
||||
"status" = $3
|
||||
and "id" in ($4)
|
||||
Loading…
Add table
Add a link
Reference in a new issue