Change the index columns in on_conflict statement for repo creation

This commit is contained in:
Vladyslav Fedoriuk 2023-08-15 14:44:08 +02:00
parent 102de55b12
commit aa3ee07a90
2 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ async def create_or_update_repos_from_source_graph_repos_data(
"""
insert_statement = sqlalchemy.dialects.sqlite.insert(database.Repo)
update_statement = insert_statement.on_conflict_do_update(
index_elements=[database.Repo.url, database.Repo.source_graph_repo_id],
index_elements=[database.Repo.source_graph_repo_id],
set_={
"url": insert_statement.excluded.url,
"description": insert_statement.excluded.description,

Binary file not shown.