diff --git a/packages/db/migrations/0128.do.create_index_for_foreign_key.sql b/packages/db/migrations/0128.do.create_index_for_foreign_key.sql index df6a07731..edbd4ae92 100755 --- a/packages/db/migrations/0128.do.create_index_for_foreign_key.sql +++ b/packages/db/migrations/0128.do.create_index_for_foreign_key.sql @@ -9,4 +9,8 @@ CREATE INDEX IF NOT EXISTS entity_labels_highlight_id_idx ON omnivore.entity_lab CREATE INDEX IF NOT EXISTS highlight_library_item_id_idx ON omnivore.highlight (library_item_id); +CREATE INDEX IF NOT EXISTS user_profile_user_id_idx ON omnivore.user_profile (user_id); + +CREATE INDEX IF NOT EXISTS library_item_user_id_idx ON omnivore.library_item (user_id); + COMMIT; diff --git a/packages/db/migrations/0128.undo.create_index_for_foreign_key.sql b/packages/db/migrations/0128.undo.create_index_for_foreign_key.sql index 34e0aba57..c22c62fbf 100755 --- a/packages/db/migrations/0128.undo.create_index_for_foreign_key.sql +++ b/packages/db/migrations/0128.undo.create_index_for_foreign_key.sql @@ -9,4 +9,10 @@ DROP INDEX IF EXISTS highlight_library_item_id_idx; DROP INDEX IF EXISTS entity_labels_highlight_id_idx; DROP INDEX IF EXISTS entity_labels_library_item_id_idx; +DROP INDEX IF NOT EXISTS user_profile_user_id_idx; + +DROP INDEX IF NOT EXISTS library_item_user_id_idx; + +DROP INDEX IF NOT EXISTS recommendation_library_item_id_idx; + COMMIT;