Commit 3a42df7c authored by Jonas Haraldsson's avatar Jonas Haraldsson

Indexes needed by track.scrobble,updatenowplaying

We dont use lower() in SELECT queries for 2.0 scrobbling as this will
eventually cause exceptions when doing INSERT without lower() because of
foreign key restrictions. We should do the same changes in gnukebox.
We should try to rewrite all queries that is using lower() so we
can remove the lowercase indexes.
parent 44654e1d
......@@ -381,6 +381,11 @@ if (isset($_POST['install'])) {
$adodb->Execute("CREATE INDEX scrobbles_time_idx ON Scrobbles(time)");
$adodb->Execute("CREATE INDEX scrobbles_userid_idx ON Scrobbles(userid)");
$adodb->Execute("CREATE INDEX track_streamable_idx on Track(streamable);");
$adodb->Execute("CREATE INDEX scrobbles_track_idx on Scrobbles(track)");
$adodb->Execute("CREATE INDEX scrobble_track_name_idx ON Scrobble_Track(name)");
$adodb->Execute("CREATE INDEX track_name_idx ON Track(name)");
$adodb->Execute("CREATE INDEX album_name_idx ON Album(name)");
$adodb->Execute("CREATE INDEX artist_name_idx ON Artist(name)");
if(strtolower(substr($dbms, 0, 5)) == 'pgsql') {
// MySQL doesn't support the use of lower() to create case-insensitive indexes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment