[db] Make I_FNAME index case insensitive and search fname using COLLATE NOCASE

Also some cleaning up
This commit is contained in:
ejurgensen
2017-10-14 20:50:58 +02:00
parent 88a565ea2c
commit 00b7b97382
4 changed files with 5 additions and 32 deletions

View File

@@ -294,7 +294,7 @@ static const struct db_init_query db_init_table_queries[] =
"CREATE INDEX IF NOT EXISTS idx_rescan ON files(path, db_timestamp);"
#define I_FNAME \
"CREATE INDEX IF NOT EXISTS idx_fname ON files(disabled, fname);"
"CREATE INDEX IF NOT EXISTS idx_fname ON files(disabled, fname COLLATE NOCASE);"
#define I_SONGARTISTID \
"CREATE INDEX IF NOT EXISTS idx_sari ON files(songartistid);"