Skip to content

Commit

Permalink
feat: Add more indices
Browse files Browse the repository at this point in the history
  • Loading branch information
whiterabbit1983 committed Dec 10, 2024
1 parent f075347 commit 58b92a2
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions agents-api/migrations/migrate_1733755642_transition_indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,26 @@

create_transition_indices = dict(
up="""
::index create executions:execution_id_status_idx { status, execution_id }
::index create transitions:execution_id_type_idx { type, execution_id }
::index create executions:execution_id_metadata_idx { metadata, execution_id }
::index create executions:execution_id_status_idx { execution_id, status }
::index create executions:execution_id_task_id_idx { execution_id, task_id }
::index create tasks:task_id_agent_id_idx { task_id, agent_id }
::index create agents:agent_id_developer_id_idx { agent_id, developer_id }
::index create sessions:session_id_developer_id_idx { session_id, developer_id }
::index create docs:owner_id_metadata_doc_id_idx { owner_id, metadata, doc_id }
::index create agents:developer_id_metadata_agent_id_idx { developer_id, metadata, agent_id }
::index create users:developer_id_metadata_user_id_idx { developer_id, metadata, user_id }
::index create transitions:execution_id_type_created_at_idx { execution_id, type, created_at }
""",
down="""
::index drop executions:execution_id_status_idx
::index drop transitions:execution_id_type_idx
::index drop executions:execution_id_metadata_idx
::index drop executions:execution_id_task_id_idx
::index drop tasks:task_id_agent_id_idx
::index drop agents:agent_id_developer_id_idx
::index drop sessions:session_id_developer_id_idx
::index drop docs:owner_id_metadata_doc_id_idx
::index drop agents:developer_id_metadata_agent_id_idx
::index drop users:developer_id_metadata_user_id_idx
::index drop transitions:execution_id_type_created_at_idx
""",
)

Expand Down

0 comments on commit 58b92a2

Please sign in to comment.