Skip to content

Commit

Permalink
make migration fail on index creation failure
Browse files Browse the repository at this point in the history
  • Loading branch information
trillville committed Jul 17, 2024
1 parent ece5948 commit 8362e49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/migrations/versions/d87a6410efe4_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ def upgrade():

op.execute(
"""
CREATE INDEX IF NOT EXISTS ix_grouping_records_new_stacktrace_embedding_hnsw
CREATE INDEX ix_grouping_records_new_stacktrace_embedding_hnsw
ON grouping_records_new USING hnsw (stacktrace_embedding vector_cosine_ops)
WITH (m = 16, ef_construction = 200);
"""
)

op.execute(
"CREATE INDEX IF NOT EXISTS ix_grouping_records_project_id ON grouping_records_new (project_id);"
"CREATE INDEX ix_grouping_records_new_project_id ON grouping_records_new (project_id);"
)

with op.batch_alter_table("grouping_records_new", schema=None) as batch_op:
Expand Down

0 comments on commit 8362e49

Please sign in to comment.