fix(api): repair conversation is_deleted removal migration

This commit is contained in:
-LAN-
2026-04-02 03:01:46 +08:00
parent 6eaadb4686
commit 0baaeac00a
3 changed files with 34 additions and 16 deletions

View File

@@ -1029,18 +1029,8 @@ class Conversation(Base):
__table_args__ = (
sa.PrimaryKeyConstraint("id", name="conversation_pkey"),
sa.Index("conversation_app_from_user_idx", "app_id", "from_source", "from_end_user_id"),
sa.Index(
"conversation_app_created_at_idx",
"app_id",
sa.text("created_at DESC"),
postgresql_where=sa.text("is_deleted IS false"),
),
sa.Index(
"conversation_app_updated_at_idx",
"app_id",
sa.text("updated_at DESC"),
postgresql_where=sa.text("is_deleted IS false"),
),
sa.Index("conversation_app_created_at_idx", "app_id", sa.text("created_at DESC")),
sa.Index("conversation_app_updated_at_idx", "app_id", sa.text("updated_at DESC")),
)
id: Mapped[str] = mapped_column(StringUUID, default=lambda: str(uuid4()))