Drop multiple-column index for user_id and state columns in library_item table since we create a new index for count covers them
This commit is contained in:
@ -1,7 +0,0 @@
|
||||
-- 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);
|
||||
7
packages/db/migrations/0175.do.add_index_for_library_item_count.sql
Executable file
7
packages/db/migrations/0175.do.add_index_for_library_item_count.sql
Executable file
@ -0,0 +1,7 @@
|
||||
-- Type: DO
|
||||
-- Name: add_index_for_library_item_count
|
||||
-- Description: Add index for counting user items in library_item table
|
||||
|
||||
CREATE INDEX CONCURRENTLY
|
||||
IF NOT EXISTS library_item_count_idx
|
||||
ON omnivore.library_item (user_id, state, archived_at, folder);
|
||||
@ -1,9 +0,0 @@
|
||||
-- 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;
|
||||
9
packages/db/migrations/0175.undo.add_index_for_library_item_count.sql
Executable file
9
packages/db/migrations/0175.undo.add_index_for_library_item_count.sql
Executable file
@ -0,0 +1,9 @@
|
||||
-- Type: UNDO
|
||||
-- Name: add_index_for_library_item_count
|
||||
-- Description: Add index for counting user items in library_item table
|
||||
|
||||
BEGIN;
|
||||
|
||||
DROP INDEX IF EXISTS omnivore.library_item_count_idx;
|
||||
|
||||
COMMIT;
|
||||
9
packages/db/migrations/0176.do.drop_user_id_state_idx.sql
Executable file
9
packages/db/migrations/0176.do.drop_user_id_state_idx.sql
Executable file
@ -0,0 +1,9 @@
|
||||
-- Type: DO
|
||||
-- Name: drop_library_item_user_id_state_idx
|
||||
-- Description: Drop multiple-column index for user_id and state columns in library_item table
|
||||
|
||||
BEGIN;
|
||||
|
||||
DROP INDEX IF EXISTS omnivore.library_item_user_id_state_idx;
|
||||
|
||||
COMMIT;
|
||||
7
packages/db/migrations/0176.undo.drop_user_id_state_idx.sql
Executable file
7
packages/db/migrations/0176.undo.drop_user_id_state_idx.sql
Executable file
@ -0,0 +1,7 @@
|
||||
-- Type: UNDO
|
||||
-- Name: drop_library_item_user_id_state_idx
|
||||
-- Description: Drop multiple-column index for user_id and state columns in library_item table
|
||||
|
||||
CREATE INDEX CONCURRENTLY
|
||||
IF NOT EXISTS library_item_user_id_state_idx
|
||||
ON omnivore.library_item (user_id, state);
|
||||
Reference in New Issue
Block a user