diff --git a/Hooks.php b/Hooks.php index efd5fe462..45e5076ac 100644 --- a/Hooks.php +++ b/Hooks.php @@ -176,6 +176,7 @@ class EchoHooks { $updater->addExtensionField( 'echo_event', 'event_deleted', "$dir/db_patches/patch-add-echo_event-event_deleted.sql" ); $updater->addExtensionIndex( 'echo_notification', 'echo_notification_user_read_timestamp', "$dir/db_patches/patch-add-user_read_timestamp-index.sql" ); $updater->addExtensionIndex( 'echo_target_page', 'echo_target_page_page_event', "$dir/db_patches/patch-add-page_event-index.sql" ); + $updater->addExtensionIndex( 'echo_event', 'echo_event_page_id', "$dir/db_patches/patch-add-event_page_id-index.sql" ); } /** diff --git a/db_patches/patch-add-event_page_id-index.sql b/db_patches/patch-add-event_page_id-index.sql new file mode 100644 index 000000000..b3b99eebb --- /dev/null +++ b/db_patches/patch-add-event_page_id-index.sql @@ -0,0 +1 @@ +CREATE INDEX /*i*/echo_event_page_id ON /*_*/echo_event (event_page_id); diff --git a/echo.sql b/echo.sql index cd8507a04..e474fc0ce 100644 --- a/echo.sql +++ b/echo.sql @@ -14,6 +14,7 @@ CREATE TABLE /*_*/echo_event ( ) /*$wgDBTableOptions*/; CREATE INDEX /*i*/echo_event_type ON /*_*/echo_event (event_type); +CREATE INDEX /*i*/echo_event_page_id ON /*_*/echo_event (event_page_id); CREATE TABLE /*_*/echo_notification ( notification_event int unsigned not null,