-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3966 from omnivore-app/feature/add-index-for-arch…
…ived-at feature/add index for archived at and folder
- Loading branch information
Showing
7 changed files
with
44 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/db/migrations/0175.do.add_index_for_library_item_count.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
9 changes: 9 additions & 0 deletions
9
packages/db/migrations/0175.undo.add_index_for_library_item_count.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |