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
This commit is contained in:
Erik Bernhardson 2013-06-14 13:14:21 -07:00
parent f5a8f1dcc8
commit 052a4818f6
2 changed files with 3 additions and 0 deletions

View file

@ -84,6 +84,7 @@ class EchoHooks {
"$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;
}

View file

@ -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;