jenkins-bot has submitted this change and it was merged.

Change subject: Rename index for sqlite support
......................................................................


Rename index for sqlite support

SQLite requires unique index names across the full database.  A previous
patch I9b6468221ba6fe501b15c563f3301694262eec65 renamed the index in
echo.sql but forgot to apply the same change to existing databases. This
resolves that mistake.

Change-Id: Ibb629149afd9f4ca55cac613124fce42500aa8f9
---
M Hooks.php
A db_patches/patch-alter-user_timestamp-index.sql
2 files changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Bsitu: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Hooks.php b/Hooks.php
index 798986b..ce994de 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -84,6 +84,7 @@
                        "$dir/db_patches/patch-email_batch-new-field.sql" );
                $updater->addExtensionField( 'echo_event', 'event_page_id', 
"$dir/db_patches/patch-add-echo_event-event_page_id.sql" );
                $updater->addExtensionIndex( 'echo_event', 'echo_event_type', 
"$dir/db_patches/patch-alter-event_type-index.sql" );
+               $updater->addExtensionIndex( 'echo_notification', 
'echo_user_timestamp', "$dir/db_patches/patch-alter-user_timestamp-index.sql" );
                return true;
        }
 
diff --git a/db_patches/patch-alter-user_timestamp-index.sql 
b/db_patches/patch-alter-user_timestamp-index.sql
new file mode 100644
index 0000000..e5710c4
--- /dev/null
+++ b/db_patches/patch-alter-user_timestamp-index.sql
@@ -0,0 +1,2 @@
+CREATE INDEX /*i*/echo_user_timestamp ON /*_*/echo_notification 
(notification_user, notification_timestamp);
+DROP INDEX /*i*/user_timestamp ON /*_*/echo_notification;

-- 
To view, visit https://gerrit.wikimedia.org/r/68728
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb629149afd9f4ca55cac613124fce42500aa8f9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: EBernhardson (WMF) <[email protected]>
Gerrit-Reviewer: Bsitu <[email protected]>
Gerrit-Reviewer: EBernhardson (WMF) <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to