Skip to content

Commit

Permalink
Add index to operations table (#768)
Browse files Browse the repository at this point in the history
* add index for operations_resource_type_resource_id_index on operations table
  • Loading branch information
nirbenrey authored Jun 1, 2022
1 parent f9fc9ce commit 0e1f670
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion storage/postgres/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package postgres

// todo: get automatically from folder
// change this line with the latest version of the migrations:
const latestMigrationVersion = "20211125100000"
const latestMigrationVersion = "20220601100000"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP INDEX IF EXISTS operations_resource_type_resource_id_index;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CREATE INDEX IF NOT EXISTS operations_resource_type_resource_id_index
on operations (resource_type, resource_id);

0 comments on commit 0e1f670

Please sign in to comment.