Skip to content

Commit

Permalink
Add some missing indexes to event table (#3504)
Browse files Browse the repository at this point in the history
Add some missing event table indexes

Signed-off-by: Sergio Castaño Arteaga <[email protected]>
  • Loading branch information
tegioz authored Nov 20, 2023
1 parent 6f48c8e commit 0d8a205
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions database/migrations/schema/051_missing_event_indexes.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
create index if not exists event_repository_id_idx on event (repository_id);
create index if not exists event_package_id_idx on event (package_id);

---- create above / drop below ----

drop index if exists event_repository_id_idx;
drop index if exists event_package_id_idx;
4 changes: 3 additions & 1 deletion database/tests/schema/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,9 @@ select indexes_are('email_verification_code', array[
]);
select indexes_are('event', array[
'event_pkey',
'event_not_processed_idx'
'event_not_processed_idx',
'event_repository_id_idx',
'event_package_id_idx'
]);
select indexes_are('image', array[
'image_pkey',
Expand Down

0 comments on commit 0d8a205

Please sign in to comment.