Rename metadata field to metadata_repr
This commit is contained in:
parent
cc0127a90e
commit
899275c25e
2 changed files with 4 additions and 3 deletions
|
|
@ -7,10 +7,11 @@ from cognee.infrastructure.databases.relational import Base
|
|||
|
||||
|
||||
class Metadata(Base):
|
||||
__tablename__ = "queries"
|
||||
__tablename__ = "metadata_table"
|
||||
|
||||
id = Column(UUID, primary_key=True, default=uuid4)
|
||||
metadata = Column(String)
|
||||
metadata_repr = Column(String)
|
||||
metadata_source = Column(String)
|
||||
|
||||
created_at = Column(
|
||||
DateTime(timezone=True), default=lambda: datetime.now(timezone.utc)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ async def write_metadata(data_item: Any) -> UUID:
|
|||
db_engine = get_relational_engine()
|
||||
async with db_engine.get_async_session() as session:
|
||||
metadata = Metadata(
|
||||
metadata=json.dumps(metadata_dict),
|
||||
metadata_repr=json.dumps(metadata_dict),
|
||||
metadata_source=parse_type(type(data_item)),
|
||||
)
|
||||
session.add(metadata)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue