feat: sync assets, partner assets, exif, and partner exif

Co-authored-by: Zack Pollard <zack@futo.org>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
Jason Rasmussen 2025-03-06 13:24:22 -05:00 committed by Alex
parent 815de124d4
commit 423a570949
No known key found for this signature in database
GPG Key ID: 53CD082B3A5E1082
2 changed files with 8 additions and 8 deletions

View File

@ -420,8 +420,8 @@ from
) as "stacked_assets" on "asset_stack"."id" is not null ) as "stacked_assets" on "asset_stack"."id" is not null
where where
"assets"."ownerId" = $1::uuid "assets"."ownerId" = $1::uuid
and "isVisible" = $2 and "assets"."isVisible" = $2
and "updatedAt" <= $3 and "assets"."updatedAt" <= $3
and "assets"."id" > $4 and "assets"."id" > $4
order by order by
"assets"."id" "assets"."id"
@ -450,7 +450,7 @@ from
) as "stacked_assets" on "asset_stack"."id" is not null ) as "stacked_assets" on "asset_stack"."id" is not null
where where
"assets"."ownerId" = any ($1::uuid[]) "assets"."ownerId" = any ($1::uuid[])
and "isVisible" = $2 and "assets"."isVisible" = $2
and "updatedAt" > $3 and "assets"."updatedAt" > $3
limit limit
$4 $4

View File

@ -938,8 +938,8 @@ export class AssetRepository {
) )
.select((eb) => eb.fn.toJson(eb.table('stacked_assets')).as('stack')) .select((eb) => eb.fn.toJson(eb.table('stacked_assets')).as('stack'))
.where('assets.ownerId', '=', asUuid(ownerId)) .where('assets.ownerId', '=', asUuid(ownerId))
.where('isVisible', '=', true) .where('assets.isVisible', '=', true)
.where('updatedAt', '<=', updatedUntil) .where('assets.updatedAt', '<=', updatedUntil)
.$if(!!lastId, (qb) => qb.where('assets.id', '>', lastId!)) .$if(!!lastId, (qb) => qb.where('assets.id', '>', lastId!))
.orderBy('assets.id') .orderBy('assets.id')
.limit(limit) .limit(limit)
@ -966,8 +966,8 @@ export class AssetRepository {
) )
.select((eb) => eb.fn.toJson(eb.table('stacked_assets')).as('stack')) .select((eb) => eb.fn.toJson(eb.table('stacked_assets')).as('stack'))
.where('assets.ownerId', '=', anyUuid(options.userIds)) .where('assets.ownerId', '=', anyUuid(options.userIds))
.where('isVisible', '=', true) .where('assets.isVisible', '=', true)
.where('updatedAt', '>', options.updatedAfter) .where('assets.updatedAt', '>', options.updatedAfter)
.limit(options.limit) .limit(options.limit)
.execute() as any as Promise<AssetEntity[]>; .execute() as any as Promise<AssetEntity[]>;
} }