add index for status and updated_at columns on user table

This commit is contained in:
Hongbo Wu
2023-10-25 13:02:34 +08:00
parent 747038ec0d
commit d3d3dd9458
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,9 @@
-- Type: DO
-- Name: add_index_for_cleanup_to_user
-- Description: Add index of status and updated_at to omnivore.user table for cleanup of deleted users
BEGIN;
CREATE INDEX IF NOT EXISTS user_status_updated_at_idx ON omnivore.user (status, updated_at);
COMMIT;

View File

@ -0,0 +1,9 @@
-- Type: UNDO
-- Name: add_index_for_cleanup_to_user
-- Description: Add index of status and updated_at to omnivore.user table for cleanup of deleted users
BEGIN;
DROP INDEX IF EXISTS user_status_updated_at_idx;
COMMIT;