-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(postgres): indexes adjustment and struct cleanup
- Loading branch information
Showing
3 changed files
with
15 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- Restore the old index on `created` | ||
CREATE INDEX IF NOT EXISTS tasks_idx_created ON tasks (created); | ||
|
||
-- Restore the index on `status` | ||
CREATE INDEX IF NOT EXISTS "idx_tasks_status" ON "tasks" ("status"); | ||
|
||
-- Drop the newly created indexes | ||
DROP INDEX IF EXISTS idx_tasks_created_app; | ||
DROP INDEX IF EXISTS idx_tasks_id; |
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,6 @@ | ||
CREATE INDEX IF NOT EXISTS idx_tasks_created_app ON tasks (created DESC, app); | ||
CREATE UNIQUE INDEX IF NOT EXISTS idx_tasks_id ON tasks (id); | ||
|
||
-- Drop indexes that are no longer needed | ||
DROP INDEX IF EXISTS tasks_idx_created; | ||
DROP INDEX IF EXISTS idx_tasks_status; |