-
Notifications
You must be signed in to change notification settings - Fork 898
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #948 from julep-ai/f/add-columns-to-indices
feat(agents-api): Add missing columns to indices
- Loading branch information
Showing
4 changed files
with
39 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
agents-api/migrations/migrate_1733985509_add_columns_to_indices.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# /usr/bin/env python3 | ||
|
||
MIGRATION_ID = "add_columns_to_indices" | ||
CREATED_AT = 1733985509.241258 | ||
|
||
|
||
def up(client): | ||
client.run( | ||
""" | ||
{ ::index drop executions:execution_id_status_idx } | ||
{ ::index create executions:execution_id_status_idx { task_id, execution_id, status } } | ||
{ ::index drop docs:owner_id_metadata_doc_id_idx } | ||
{ ::index create docs:owner_id_metadata_doc_id_idx { owner_type, owner_id, metadata, doc_id } } | ||
""" | ||
) | ||
|
||
|
||
def down(client): | ||
client.run( | ||
""" | ||
{ ::index drop executions:execution_id_status_idx } | ||
{ ::index create executions:execution_id_status_idx { execution_id, status } } | ||
{ ::index drop docs:owner_id_metadata_doc_id_idx } | ||
{ ::index create docs:owner_id_metadata_doc_id_idx { owner_id, metadata, doc_id } } | ||
""" | ||
) |