Convert cuetracks to join table #2

Open
opened 2021-07-22 12:37:02 +00:00 by dsonck · 0 comments
dsonck commented 2021-07-22 12:37:02 +00:00 (Migrated from git.touhou.fm)

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 foreign disc_id
  • discs should be completely removed
  • cuefiles should get a discnumber
  • cuetracks should get a foreign album_id

Migration

  • discs discnumber should be written to the cuefiles discnumber column
  • songs disc_id should be transformed into an album_id and written to the associated cuetracks
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 foreign `disc_id` - [ ] `discs` should be completely removed - [ ] `cuefiles` should get a `discnumber` - [ ] `cuetracks` should get a foreign `album_id` **Migration** - [ ] `discs` `discnumber` should be written to the `cuefiles` `discnumber` column - [ ] `songs` `disc_id` should be transformed into an `album_id` and written to the associated `cuetracks`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
touhou.fm-rust/touhou.fm-radio-rust#2
No description provided.