feat: add is_extended_promotional column to components#142
Open
CharlesWong wants to merge 3 commits intotscircuit:mainfrom
Open
feat: add is_extended_promotional column to components#142CharlesWong wants to merge 3 commits intotscircuit:mainfrom
CharlesWong wants to merge 3 commits intotscircuit:mainfrom
Conversation
- Added is_extended_promotional boolean column via DB optimization script - Updated component-base derivedtable to include the field - Updated Kysely types to reflect the new column - Exposed in search API and component list routes (capacitors, resistors, resistor_arrays) - Added test coverage for search API returning the field Fixes tscircuit#92
- Added is_extended_promotional boolean column to all component list routes - Updated Kysely generated types to include the new column - Updated cf-proxy DB types with is_extended_promotional field - Column populated from JLCPCB data source (Boolean conversion) - Updated DB optimization scripts to include the new column Fixes tscircuit#92
Author
|
Hi! Just checking in — any chance this could get a review? Happy to make any adjustments needed. Thanks! |
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
Adds the
is_extended_promotionalboolean column to components from the JLCPCB data source, as requested in #92.Changes
Database
lib/db/optimizations/component-extended-promotional-column.tsthat adds the column and populates it from the raw component datascripts/setup-db-optimizations.tsSchema
lib/db/generated/kysely.tswith the new column typelib/db/derivedtables/component-base.tsto includeis_extended_promotionalin derived table creationAPI
routes/api/search.tsxnow returnsis_extended_promotionalin search resultsTests
tests/routes/api/search.test.tsto verify the field is present in API responsesNotes
components/listroute was NOT updated because it queriesv_components(an external view). The column is available on the derived table.Fixes #92