-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FS-853: Create BOM service table scheme and generate ORM files. #231
Conversation
60f4b24
to
f37972c
Compare
Codecov Report
@@ Coverage Diff @@
## main #231 +/- ##
=======================================
Coverage 71.87% 71.87%
=======================================
Files 36 36
Lines 3549 3549
=======================================
Hits 2551 2551
Misses 745 745
Partials 253 253
Flags with carried forward coverage won't be shown. Click here to find out more. |
d2406ca
to
99ddf8b
Compare
487f831
to
0388df9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks reasonable to me. Have you tried creating these tables and verifying it in the sandbox?
db/migrations/00021_bom.sql
Outdated
metro STRING NULL | ||
); | ||
|
||
CREATE TABLE mac_aoc_address_bom ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor naming quibbles: consider renaming one of the two Mac tables so they are more consistent? Either aoc_mac_address
or mac_bmc_address
? Also, it feels like the _bom
suffix stutters here (i.e it repeats without adding much value).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thanks!
internal/models/boil_suites_test.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kinda neat that it generates code and tests itself for the tables you created.
f4db7a2
to
9f9cf46
Compare
This PR create sqlboiler sql file and generate related ORM model files for BOM service.
As listed in the design doc, we will need to create 3 tables
bom-info
,aoc_mac_address_bom
andbmc_mac_address_bom
.More table details can be found in design doc: 19IG7fU0jc_F3GV71nx_P5hbMHjhCv3_EzIUmFfvCGNU.
Tested in Sandbox:
When using the locally built serverService image in sandbox,
the crdb initialize the new added tables successfully.