fix tests

This commit is contained in:
Hongbo Wu 2024-02-23 11:17:37 +08:00
parent 534b28c536
commit 58e33cc4e0
4 changed files with 18 additions and 7 deletions

View file

@ -1,7 +1,5 @@
-- Type: DO
-- Name: create_more_index_on_library_item
-- Description: Create more indexes on omnivore.library_item table to improve query performance
-- Name: library_item_user_id_state_index
-- Description: Create an index on omnivore.library_item table for querying by user_id and state
CREATE INDEX CONCURRENTLY IF NOT EXISTS library_item_user_id_state_idx ON omnivore.library_item (user_id, state);
CREATE INDEX CONCURRENTLY IF NOT EXISTS api_key_key_idx ON omnivore.api_key (key);

View file

@ -1,10 +1,9 @@
-- Type: UNDO
-- Name: create_more_index_on_library_item
-- Description: Create more indexes on omnivore.library_item table to improve query performance
-- Name: library_item_user_id_state_index
-- Description: Create an index on omnivore.library_item table for querying by user_id and state
BEGIN;
DROP INDEX IF EXISTS api_key_key_idx;
DROP INDEX IF EXISTS library_item_user_id_state_idx;
COMMIT;

View file

@ -0,0 +1,5 @@
-- Type: DO
-- Name: api_key_index
-- Description: Create an index for checking key in api_key table
CREATE INDEX CONCURRENTLY IF NOT EXISTS api_key_key_idx ON omnivore.api_key (key);

View file

@ -0,0 +1,9 @@
-- Type: UNDO
-- Name: api_key_index
-- Description: Create an index for checking key in api_key table
BEGIN;
DROP INDEX IF EXISTS api_key_key_idx;
COMMIT;