Convert cuetracks to join table
Currently, the foreign key references describe the following structure:
circle <- album <- disc <- track <- cuetrack -> cuefile
However, this means that tracks which are present on multiple albums or discs will be duplicated. This is not ideal since tracks get often included multiple times (e.g. with collection albums).
A proposed solution is to, instead, let the cuetrack link albums, tracks and discs together. In addition to this, cuefiles should encode the disc number (since it actually describes a specific disc).
Upon completion
-
songs
should not have a foreigndisc_id
-
discs
should be completely removed -
cuefiles
should get adiscnumber
-
cuetracks
should get a foreignalbum_id
Migration
-
discs
discnumber
should be written to thecuefiles
discnumber
column -
songs
disc_id
should be transformed into analbum_id
and written to the associatedcuetracks