mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-12-18 02:23:06 +08:00
removed not needed "assets.updated_at" column
This commit is contained in:
parent
871e41aec6
commit
bdf4ba24ce
@ -23,7 +23,6 @@ def upgrade() -> None:
|
||||
sa.Column("size_bytes", sa.BigInteger(), nullable=False, server_default="0"),
|
||||
sa.Column("mime_type", sa.String(length=255), nullable=True),
|
||||
sa.Column("created_at", sa.DateTime(timezone=False), nullable=False),
|
||||
sa.Column("updated_at", sa.DateTime(timezone=False), nullable=False),
|
||||
sa.CheckConstraint("size_bytes >= 0", name="ck_assets_size_nonneg"),
|
||||
)
|
||||
op.create_index("ix_assets_mime_type", "assets", ["mime_type"])
|
||||
|
||||
@ -47,9 +47,6 @@ class Asset(Base):
|
||||
created_at: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=False), nullable=False, default=utcnow
|
||||
)
|
||||
updated_at: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=False), nullable=False, default=utcnow
|
||||
)
|
||||
|
||||
infos: Mapped[list["AssetInfo"]] = relationship(
|
||||
"AssetInfo",
|
||||
|
||||
@ -85,7 +85,7 @@ async def ingest_fs_asset(
|
||||
Upsert Asset identity row + cache state pointing at local file.
|
||||
|
||||
Always:
|
||||
- Insert Asset if missing; else update size_bytes (and updated_at) if different.
|
||||
- Insert Asset if missing;
|
||||
- Insert AssetCacheState if missing; else update mtime_ns if different.
|
||||
|
||||
Optionally (when info_name is provided):
|
||||
@ -123,7 +123,6 @@ async def ingest_fs_asset(
|
||||
size_bytes=int(size_bytes),
|
||||
mime_type=mime_type,
|
||||
created_at=datetime_now,
|
||||
updated_at=datetime_now,
|
||||
)
|
||||
)
|
||||
await session.flush()
|
||||
@ -140,7 +139,6 @@ async def ingest_fs_asset(
|
||||
existing.mime_type = mime_type
|
||||
changed = True
|
||||
if changed:
|
||||
existing.updated_at = datetime_now
|
||||
out["asset_updated"] = True
|
||||
else:
|
||||
logging.error("Asset %s not found after PK conflict; skipping update.", asset_hash)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user