mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore: asset sync FKs (#19927)
This commit is contained in:
parent
a97ba4862f
commit
805ec3e351
9 changed files with 59 additions and 1 deletions
|
|
@ -349,6 +349,8 @@ export const columns = {
|
|||
'asset.isFavorite',
|
||||
'asset.visibility',
|
||||
'asset.duration',
|
||||
'asset.livePhotoVideoId',
|
||||
'asset.stackId',
|
||||
],
|
||||
syncAlbumUser: ['album_user.albumsId as albumId', 'album_user.usersId as userId', 'album_user.role'],
|
||||
syncStack: ['stack.id', 'stack.createdAt', 'stack.updatedAt', 'stack.primaryAssetId', 'stack.ownerId'],
|
||||
|
|
|
|||
|
|
@ -96,6 +96,8 @@ export class SyncAssetV1 {
|
|||
isFavorite!: boolean;
|
||||
@ApiProperty({ enumName: 'AssetVisibility', enum: AssetVisibility })
|
||||
visibility!: AssetVisibility;
|
||||
livePhotoVideoId!: string | null;
|
||||
stackId!: string | null;
|
||||
}
|
||||
|
||||
@ExtraModel()
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ select
|
|||
"asset"."isFavorite",
|
||||
"asset"."visibility",
|
||||
"asset"."duration",
|
||||
"asset"."livePhotoVideoId",
|
||||
"asset"."stackId",
|
||||
"asset"."updateId"
|
||||
from
|
||||
"asset"
|
||||
|
|
@ -91,6 +93,8 @@ select
|
|||
"asset"."isFavorite",
|
||||
"asset"."visibility",
|
||||
"asset"."duration",
|
||||
"asset"."livePhotoVideoId",
|
||||
"asset"."stackId",
|
||||
"asset"."updateId"
|
||||
from
|
||||
"asset"
|
||||
|
|
@ -351,6 +355,8 @@ select
|
|||
"asset"."isFavorite",
|
||||
"asset"."visibility",
|
||||
"asset"."duration",
|
||||
"asset"."livePhotoVideoId",
|
||||
"asset"."stackId",
|
||||
"asset"."updateId"
|
||||
from
|
||||
"asset"
|
||||
|
|
@ -539,6 +545,8 @@ select
|
|||
"asset"."isFavorite",
|
||||
"asset"."visibility",
|
||||
"asset"."duration",
|
||||
"asset"."livePhotoVideoId",
|
||||
"asset"."stackId",
|
||||
"asset"."updateId"
|
||||
from
|
||||
"asset"
|
||||
|
|
@ -584,6 +592,8 @@ select
|
|||
"asset"."isFavorite",
|
||||
"asset"."visibility",
|
||||
"asset"."duration",
|
||||
"asset"."livePhotoVideoId",
|
||||
"asset"."stackId",
|
||||
"asset"."updateId"
|
||||
from
|
||||
"asset"
|
||||
|
|
|
|||
|
|
@ -380,6 +380,8 @@ export class JobService extends BaseService {
|
|||
deletedAt: asset.deletedAt,
|
||||
isFavorite: asset.isFavorite,
|
||||
visibility: asset.visibility,
|
||||
livePhotoVideoId: asset.livePhotoVideoId,
|
||||
stackId: asset.stackId,
|
||||
},
|
||||
exif: {
|
||||
assetId: exif.assetId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue