play_time -> min & sec fields
Brought to you by:
oliphant
This is in no way necessary, but I found it useful.
I converted play_time to minutes and seconds some time
ago. Using the ddj
database scheme but another interface brought to my
attention that it might be
easier to keep time as min+sec. It slightly reduces
the complexity of ddj (no
converting forth between the two), and offloads what
processing there is to MySQL.
The database changes are *not* included in the patch,
but basically I
a) mysqldump'ed the song schema and database.
b) changed the schema, replacing play_time for min and sec
c) s/\'(\d+)\:(\d+)\'/$1\,$2/g in the INSERT lines of
tthe dump
d) mysqlimport'ed the song schema and database.
the code patch is included below
min+sec patch