Develop #16

Merged
tao.chen merged 273 commits from develop into main 2026-08-21 10:42:09 +08:00
Showing only changes of commit d5de1a63d4 - Show all commits
+7
View File
@@ -10,6 +10,13 @@ from common.db.base import Base
class StorageObjects(Base):
__tablename__ = "storage_objects"
# Force SQLAlchemy to round-trip server-default columns (created_at,
# updated_at, ...) via a follow-up SELECT after INSERT. Without this,
# attributes populated by `server_default` stay unloaded on the ORM
# object and the next sync read (e.g. storage_payload in storage_api.py)
# triggers a lazy refresh through the async driver, which raises
# MissingGreenlet because the read happens outside an awaitable.
__mapper_args__ = {"eager_defaults": "auto"}
__table_args__ = (
Index("fk_storage_created_by", "created_by"),
Index("idx_storage_content_hash", "content_hash"),