add index for archived_at column

This commit is contained in:
Hongbo Wu 2024-05-18 21:29:12 +08:00
parent be9e826446
commit 62d4b613f4
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,7 @@
-- Type: DO
-- Name: add_index_for_archived_at
-- Description: Add index for archived_at column in library_item table
CREATE INDEX CONCURRENTLY
IF NOT EXISTS library_item_user_id_archived_at_idx
ON omnivore.library_item (user_id, archived_at DESC NULLS LAST);

View file

@ -0,0 +1,9 @@
-- Type: UNDO
-- Name: add_index_for_archived_at
-- Description: Add index for archived_at column in library_item table
BEGIN;
DROP INDEX IF EXISTS omnivore.library_item_user_id_archived_at_idx;
COMMIT;