Skip to content

Commit

Permalink
Merge pull request #1039 from julep-ai/x/remove-bad-indices
Browse files Browse the repository at this point in the history
fix(memory-store): Remove bad indices
  • Loading branch information
creatorrr authored Jan 11, 2025
2 parents a5f4132 + 6d65d21 commit 0509485
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions memory-store/migrations/000012_transitions.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,6 @@ SELECT
-- Create indexes if they don't exist
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_indexes WHERE indexname = 'idx_transitions_current') THEN
CREATE UNIQUE INDEX idx_transitions_current ON transitions (execution_id, current_step, created_at DESC);
END IF;

IF NOT EXISTS (SELECT 1 FROM pg_indexes WHERE indexname = 'idx_transitions_next') THEN
CREATE UNIQUE INDEX idx_transitions_next ON transitions (execution_id, next_step, created_at DESC)
WHERE next_step IS NOT NULL;
END IF;

IF NOT EXISTS (SELECT 1 FROM pg_indexes WHERE indexname = 'idx_transitions_label') THEN
CREATE UNIQUE INDEX idx_transitions_label ON transitions (execution_id, step_label, created_at DESC)
WHERE step_label IS NOT NULL;
END IF;

IF NOT EXISTS (SELECT 1 FROM pg_indexes WHERE indexname = 'idx_transitions_metadata') THEN
CREATE INDEX idx_transitions_metadata ON transitions USING GIN (metadata);
END IF;
Expand Down

0 comments on commit 0509485

Please sign in to comment.