feat: add labels table and normalize label data#163
Open
jakebromberg wants to merge 1 commit intomainfrom
Open
feat: add labels table and normalize label data#163jakebromberg wants to merge 1 commit intomainfrom
jakebromberg wants to merge 1 commit intomainfrom
Conversation
Add normalized label support to Backend-Service: Schema: - Add labels table (id, label_name, parent_label_id) - Add label_id FK to library and flowsheet tables - Add label_id to library_artist_view and rotation_library_view Service layer: - Add labels service with CRUD + search + upsert by name - Add labels controller and routes (GET/POST /labels) - Update library controller to resolve label strings to label_id - Update library service to return label_id in queries - Update flowsheet service to propagate label_id through entries - Add label_id to V2 flowsheet track entries Tests: - Add labels service unit tests (8 tests) - Add flowsheet label_id propagation test - Update database mock with label support
c9126ff to
d142f47
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
labelstable withid,label_name(unique), andparent_label_id(self-referencing)label_idFK tolibraryandflowsheettables (nullable, alongside existing varchar columns)/labels) with permission-gated endpointslabel_idvia upsert on album creationlabel_idin querieslabel_idthrough V2 flowsheet track entriesCompanion PR: WXYC/wxyc-shared#9 (API contract changes)
Test plan
drizzle:generate+drizzle:migrateto apply schema migration