removed not needed "refcount" column

This commit is contained in:
bigcat88
2025-08-27 21:36:31 +03:00
parent eb7008a4d3
commit 871e41aec6
3 changed files with 1 additions and 5 deletions

View File

@@ -44,7 +44,6 @@ class Asset(Base):
hash: Mapped[str] = mapped_column(String(256), primary_key=True)
size_bytes: Mapped[int] = mapped_column(BigInteger, nullable=False, default=0)
mime_type: Mapped[str | None] = mapped_column(String(255))
refcount: Mapped[int] = mapped_column(BigInteger, nullable=False, default=0)
created_at: Mapped[datetime] = mapped_column(
DateTime(timezone=False), nullable=False, default=utcnow
)

View File

@@ -89,7 +89,7 @@ async def ingest_fs_asset(
- Insert AssetCacheState if missing; else update mtime_ns if different.
Optionally (when info_name is provided):
- Create an AssetInfo (no refcount changes).
- Create an AssetInfo.
- Link provided tags to that AssetInfo.
* If the require_existing_tags=True, raises ValueError if any tag does not exist in `tags` table.
* If False (default), create unknown tags.
@@ -122,7 +122,6 @@ async def ingest_fs_asset(
hash=asset_hash,
size_bytes=int(size_bytes),
mime_type=mime_type,
refcount=0,
created_at=datetime_now,
updated_at=datetime_now,
)