Change preview_id to reference asset by reference ID, not content ID

Clients receive preview_id in API responses but could not dereference it
through public routes (which use reference IDs). Now preview_id is a
self-referential FK to asset_references.id so the value is directly
usable in the public API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Luke Mino-Altherr
2026-03-12 14:33:29 -07:00
parent 2e35c77e10
commit 23e458e549
9 changed files with 91 additions and 38 deletions

View File

@ -34,6 +34,7 @@ from app.assets.database.queries.asset_reference import (
list_references_by_asset_id,
list_references_page,
mark_references_missing_outside_prefixes,
reference_exists,
reference_exists_for_asset_id,
restore_references_by_paths,
set_reference_metadata,
@ -104,6 +105,7 @@ __all__ = [
"list_tags_with_usage",
"mark_references_missing_outside_prefixes",
"reassign_asset_references",
"reference_exists",
"reference_exists_for_asset_id",
"remove_missing_tag_for_asset_id",
"remove_tags_from_reference",