|
|
@@ -5,7 +5,7 @@ from __future__ import annotations
|
|
|
from datetime import datetime
|
|
|
from decimal import Decimal
|
|
|
|
|
|
-from sqlalchemy import BigInteger, ForeignKey, Index, Integer, Numeric, String, Text, UniqueConstraint, func
|
|
|
+from sqlalchemy import BigInteger, Index, Integer, Numeric, String, Text, UniqueConstraint, func
|
|
|
from sqlalchemy.dialects.mysql import LONGTEXT
|
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
|
|
@@ -97,11 +97,8 @@ class FindAgentV2Candidate(Base):
|
|
|
|
|
|
id: Mapped[int] = mapped_column(BigInteger, primary_key=True, autoincrement=True)
|
|
|
run_id: Mapped[str] = mapped_column(String(64), nullable=False)
|
|
|
- first_search_id: Mapped[int | None] = mapped_column(
|
|
|
- BigInteger,
|
|
|
- ForeignKey("find_agent_v2_search.id", name="fk_find_agent_v2_candidate_search"),
|
|
|
- nullable=True,
|
|
|
- )
|
|
|
+ # Logical reference only. find_agent_v2 deliberately uses no database FKs.
|
|
|
+ first_search_id: Mapped[int | None] = mapped_column(BigInteger, nullable=True)
|
|
|
aweme_id: Mapped[str] = mapped_column(String(64), nullable=False)
|
|
|
title: Mapped[str | None] = mapped_column(String(512), nullable=True)
|
|
|
content_link: Mapped[str | None] = mapped_column(String(1024), nullable=True)
|