refactor: migrate stacks (#17559)

chore: migrate stacks
This commit is contained in:
Daniel Dietzler 2025-04-12 14:33:35 +02:00 committed by GitHub
parent 5dac315af7
commit a373034629
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 153 additions and 63 deletions

View file

@ -15,7 +15,35 @@ select
"assets"
inner join lateral (
select
"exif".*
"exif"."assetId",
"exif"."autoStackId",
"exif"."bitsPerSample",
"exif"."city",
"exif"."colorspace",
"exif"."country",
"exif"."dateTimeOriginal",
"exif"."description",
"exif"."exifImageHeight",
"exif"."exifImageWidth",
"exif"."exposureTime",
"exif"."fileSizeInByte",
"exif"."fNumber",
"exif"."focalLength",
"exif"."fps",
"exif"."iso",
"exif"."latitude",
"exif"."lensModel",
"exif"."livePhotoCID",
"exif"."longitude",
"exif"."make",
"exif"."model",
"exif"."modifyDate",
"exif"."orientation",
"exif"."profileDescription",
"exif"."projectionType",
"exif"."rating",
"exif"."state",
"exif"."timeZone"
from
"exif"
where
@ -52,7 +80,12 @@ select
from
(
select
"tags".*
"tags"."id",
"tags"."value",
"tags"."createdAt",
"tags"."updatedAt",
"tags"."color",
"tags"."parentId"
from
"tags"
inner join "tag_asset" on "tags"."id" = "tag_asset"."tagsId"
@ -65,7 +98,35 @@ select
"assets"
inner join lateral (
select
"exif".*
"exif"."assetId",
"exif"."autoStackId",
"exif"."bitsPerSample",
"exif"."city",
"exif"."colorspace",
"exif"."country",
"exif"."dateTimeOriginal",
"exif"."description",
"exif"."exifImageHeight",
"exif"."exifImageWidth",
"exif"."exposureTime",
"exif"."fileSizeInByte",
"exif"."fNumber",
"exif"."focalLength",
"exif"."fps",
"exif"."iso",
"exif"."latitude",
"exif"."lensModel",
"exif"."livePhotoCID",
"exif"."longitude",
"exif"."make",
"exif"."model",
"exif"."modifyDate",
"exif"."orientation",
"exif"."profileDescription",
"exif"."projectionType",
"exif"."rating",
"exif"."state",
"exif"."timeZone"
from
"exif"
where

View file

@ -2,12 +2,12 @@
-- TagRepository.get
select
"id",
"value",
"createdAt",
"updatedAt",
"color",
"parentId"
"tags"."id",
"tags"."value",
"tags"."createdAt",
"tags"."updatedAt",
"tags"."color",
"tags"."parentId"
from
"tags"
where
@ -15,12 +15,12 @@ where
-- TagRepository.getByValue
select
"id",
"value",
"createdAt",
"updatedAt",
"color",
"parentId"
"tags"."id",
"tags"."value",
"tags"."createdAt",
"tags"."updatedAt",
"tags"."color",
"tags"."parentId"
from
"tags"
where
@ -42,12 +42,12 @@ rollback
-- TagRepository.getAll
select
"id",
"value",
"createdAt",
"updatedAt",
"color",
"parentId"
"tags"."id",
"tags"."value",
"tags"."createdAt",
"tags"."updatedAt",
"tags"."color",
"tags"."parentId"
from
"tags"
where