Skip to content

Commit

Permalink
Merge pull request #172 from symbiont-io/db/create-index
Browse files Browse the repository at this point in the history
perf(db): Add index for test-id
  • Loading branch information
symbiont-daniel-gustafsson authored Mar 18, 2021
2 parents 91ae7df + 2471476 commit f3aed10
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/db/migrations/1_create_views.sql
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ CREATE VIEW IF NOT EXISTS test_info AS
FROM event_log
WHERE event LIKE 'CreateTest';

CREATE INDEX IF NOT EXISTS idx_test_id
ON event_log(json_extract(meta, '$.test-id'));

-- +migrate Down
DROP INDEX IF EXISTS idx_test_id;

DROP VIEW IF EXISTS execution_step;
DROP VIEW IF EXISTS jepsen_history;
DROP VIEW IF EXISTS network_trace;
Expand Down

0 comments on commit f3aed10

Please sign in to comment.