programsam / binkjs

Music archival site BINK, rewritten as a Node.js express app
0 stars 1 forks source link

hasPics, hasVids, hasTracks ... boolean flags #125

Closed programsam closed 1 month ago

programsam commented 3 years ago

So rather than making it such that to compute this, you have to do a select against the tracks table, for example, for any/all tracks that might match this jamid, why not instead just have it be something that is modified on creation. That is, on default, these are all set to false as columns in the table for jams and then if you add tracks, successfully, this gets set to true for tracks, and if you remove a track... are there any tracks? Set it to that value.

programsam commented 1 month ago

Done! https://github.com/programsam/binkjs/commit/a6775839627d3a715ddd3a4ec89a905cf34518ec