Adjust Size model and create SizeRangeSize for sizes_sizegroup join table#2679
Draft
Copilot wants to merge 2 commits into
Draft
Adjust Size model and create SizeRangeSize for sizes_sizegroup join table#2679Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
…table Agent-Logs-Url: https://github.com/boxwise/boxtribute/sessions/659482ae-deae-4e84-8783-7e62026bf086 Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pylipp
April 21, 2026 16:14
View session
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2679 +/- ##
=======================================
Coverage 76.77% 76.77%
=======================================
Files 300 300
Lines 22182 22182
Branches 2232 2232
=======================================
Hits 17030 17030
Misses 5104 5104
Partials 48 48
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
The DB migration in dropapp#821 removes
sizes.sizegroup_idandsizes.seq, replacing the direct FK with a newsizes_sizegroupcross-reference table. This PR updates the BE models and all query code to match.Model changes
Size: removedseqandsize_range(sizegroup_id FK) fieldsSizeRangeSize(new): mapssizes_sizegroupwithsize_id → sizesandsizegroup_id → sizegroup, usingCompositeKey("size", "size_range")models/__init__.py: registersSizeRangeSizeinMODELSQuery updates
All code that previously joined
SizetoSizeRangedirectly now routes throughSizeRangeSize:Affected files:
loaders.py(SizesForSizeRangeLoader),warehouse/box/crud.py(bulk create),mobile_distribution/crud.py,cron/data_faking.py.Test data
size_rangefrom size fixturessize_range_size.pytest data module; inserted into_NAMESordering aftersize