Skip to content

Commit

Permalink
refactor(cdn): clean some unused idx (#5886)
Browse files Browse the repository at this point in the history
* refactor(cdn): clean some unused idx

Signed-off-by: Yvonnick Esnault <[email protected]>

* fix: idx_item_status_type

Signed-off-by: Yvonnick Esnault <[email protected]>

* fix: cr

Signed-off-by: Yvonnick Esnault <[email protected]>
  • Loading branch information
yesnault authored Jul 13, 2021
1 parent b4d99f6 commit b1a2379
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions engine/sql/cdn/015_cdn_idx_clean.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- +migrate Up
DROP INDEX "idx_log_item";
DROP INDEX "idx_log_project_key";
DROP INDEX "idx_api_ref";
DROP INDEX "idx_storage_unit_item_hash_locator";
DROP INDEX "idx_item_status_type";

-- +migrate Down
CREATE INDEX idx_log_item ON item(type, (api_ref->>'job_id'), (api_ref->>'step_order'));
CREATE INDEX idx_log_project_key ON item((api_ref->>'project_key'));
CREATE INDEX idx_api_ref ON "item" USING GIN (api_ref);
SELECT create_index('storage_unit_item', 'idx_storage_unit_item_hash_locator', 'id,hash_locator');
SELECT create_index('item', 'idx_item_status_type', 'status,type');

0 comments on commit b1a2379

Please sign in to comment.