Add 'user_tracks'

Anna Schumaker 2023-05-10 15:55:33 -04:00
parent 109e0d0328
commit 4d3f8de9ce
1 changed files with 16 additions and 0 deletions

16
user_tracks.md Normal file

@ -0,0 +1,16 @@
The `user_tracks` table is used to link [[tracks]] to their associated [[playlist_properties]]. This table is similar to the [[system_tracks]] table, except it adds a position column so users can manually arrange tracks.
### Columns
| Name | Type | Description |
| --------------------------------- | ------- | ------------------------------------------- |
| [trackid](tracks) | INTEGER | The trackid of one of the playlist's tracks |
| [propertyid](playlist_properties) | INTEGER | The propertyid of the playlist |
| position | INTEGER | The position of the track in the playlist |
### The `user_tracks_view`
The `user_tracks_view` is intended to be used by playlists when they load their trackids, and automatically filters out tracks that are in the process of being deleted.
| Column | Description |
| --------------------------------- | ----------------------------------------- |
| [trackid](tracks) | The trackid of the track |
| [propertyid](playlist_properties) | The propertyid of the playlist |
| position | The position of the track in the playlist |