gadgetmies / fomoplayer

Music Discovery App
5 stars 1 forks source link

Enhance performance of tracks and carts queries #57

Open gadgetmies opened 2 years ago

gadgetmies commented 2 years ago

The track and cart details could be stored in the track and cart table rows as JSON, which could then be updated periodically.

The carts would not need to have a separate association table for the tracks in carts, but could instead store the contents in the same row as other details. Updating the cart contents should be relatively straight forward as removing an item from the cart would only mean deleting single item from the JSON and adding would require querying the track details for single track and adding that to the JSON.