Replies: 3 comments 2 replies
-
Might be worth considering what metadata sources typically provide.
Sounds like a good idea at a first glance (but probably requires some more thought): This would also help with commands that operate on a per-file (instead of per-item) basis, such as
Could be implemented as a computed field for backwards compatibility, so we could indeed avoid duplicating the information. |
Beta Was this translation helpful? Give feedback.
-
There is some info in #1640, perhaps. The idea back then was to add a file table to the database model, which would hold the information specific to that particular file. Format, samplerate, bitrate, etc. The track table that's currently already there would hold the track specific info that's independent of the actual file (artist, title, etc). The initial step would be to just get the db split implemented. So still retain the 1:1 relationship in the beginning and just get the split structure right. Edit: Some more background info, I wanted to keep the file information table to stay somewhat generic, so that we could also put attachment data in there, e.g. cover images. So perhaps a file_attributes table as well, that holds flex attrs. |
Beta Was this translation helpful? Give feedback.
-
@sampsyo is there any existing code that deals with data migrations to accomodate schema evolution over time? The only reference to migrations I see is in line 1010 of db.py in the I ask because adding the |
Beta Was this translation helpful? Give feedback.
-
Split from #4269 (reply in thread)
@sampsyo any preferences on how the database migration should be performed? What I have in mind is the 2 new non-nullable columns for start and end duration.
length
is a float in seconds, I was thinking of using an integer to store the start and end duration in ms instead. I usually default to integers when I can to avoid dealing with the complexity of floats.length
column, or remove it because it can be deduced from end - start?Beta Was this translation helpful? Give feedback.
All reactions