I've been adding my own statements to
server/SQL/mysql/schema_optimize.sql for a couple of years now. It
works well. The only oddity I've run into is this: the extra code I'm
adding is my custom genre name fix-up query:
Code:
--------------------
--
-- Fix up genre names
--
UPDATE genres
set name = CASE when name = 'A_Medieval' then 'Medieval'
when name = 'B_Renaissance' then 'Renaissance'
when name = 'C_Early_Baroque' then 'Early Baroque'
when name = 'D_English_Italian_Baroque' then concat('Italian ', char(38), '
English Baroque')
when name = 'E_Spanish_Latin_American_Baroque' then concat('Spanish ',
char(38), ' Latin-American Baroque')
when name = 'F_French_Baroque' then 'French Baroque'
when name = 'G_German_Baroque' then 'German Baroque'
when name = 'H_Classical' then 'Classical'
when name = 'I_Romantic' then 'Romantic'
when name = 'J_Post-Romantic' then 'Post-Romantic'
when name = 'K_Post-Romantic-Nationalist' then 'Post-Romantic Nationalist'
when name = 'L_Modern_Central_European' then 'Central-European Modernism'
when name = 'M_Modern_German' then 'German Modernism'
when name = 'N_Modern_French' then 'French Modernism'
when name = 'O_Modern_Russian' then 'Russian Modernism'
when name = 'P_Modern_Scandinavian' then 'Scandinavian Modernism'
when name = 'Q_Modern_Italian-Spanish' then concat('Italian ', char(38), '
Spanish Modernism')
when name = 'R_Modern_Latin-American' then 'Latin-American Modernism'
when name = 'S_Modern_American-English' then concat('English ', char(38), '
American Modernism')
when name = 'T_Post Modern Contemporary' then 'Contemporary Post-Modernism'
when name = 'U_Post Modern Aleatoric' then 'Aleatoric Post-Modernism'
when name = 'V_Post Modern Minimalist' then 'Minimalist Post-Modernism'
when name = 'W_World_Classical' then 'World Classical'
when name = 'X_Jazz and Blues' then concat('Jazz ', char(38), ' Blues')
when name = 'W_Jazz' then 'Jazz'
when name = concat('Y_French Pop ', char(38), ' Jazz') then concat('French
Pop ', char(38), ' Jazz')
when name = 'Y_Funk' then 'Funk'
when name = 'Y_Pop' then 'Pop'
when name = 'Y_Pop_Avant-Guard' then 'Pop Avant-Guard'
when name = 'Y_World_Pop' then 'World Pop'
when name = 'Y_Rockabilly' then 'Rockabilly'
when name = 'Yy_Techno' then 'Techno'
when name = 'Z_Folk' then 'Folk'
when name = 'Zzz_AudioBook' then 'AudioBooks'
when name = 'Zzz_Environmental' then 'Environmental'
when name = 'Zzz_Meditation' then 'Meditation'
Else name
End ;
--
-- Optimise the schema
--------------------
The weird thing is, in order to make this query work on my linux
server, I have to transfer the file over from my windows box in binary
mode so as to preserve the CR/LF line endings. I have no idea why this
should be so, but it seems to be.
--
gharris999
------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=49014
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins