Skip to content

Commit

Permalink
create weaviate migration
Browse files Browse the repository at this point in the history
  • Loading branch information
isabellagessl committed Nov 19, 2024
1 parent be71ea4 commit 5e0b102
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app/vector_database/lecture_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ def init_lecture_schema(client: WeaviateClient) -> Collection:
"""
if client.collections.exists(LectureSchema.COLLECTION_NAME.value):
collection = client.collections.get(LectureSchema.COLLECTION_NAME.value)

# collection.config.add_property(
# Property(
# name=LectureSchema.COURSE_LANGUAGE.value,
# description="The language of the COURSE",
# data_type=DataType.TEXT,
# index_searchable=False,
# )
# )
if not any((property.name == "course_language") for property in collection.config.get(simple=False).properties):
collection.config.add_property(
Property(
name=LectureSchema.COURSE_LANGUAGE.value,
description="The language of the COURSE",
data_type=DataType.TEXT,
index_searchable=False,
)
)

return collection

Expand Down

0 comments on commit 5e0b102

Please sign in to comment.