-
Notifications
You must be signed in to change notification settings - Fork 1
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-1234; Expand DB Schema to allow storing Config Sets #43
Merged
Merged
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
0e5e5a7
FS-1234; Environment fixes
jakeschuurmans f125a15
FS-1234; API
jakeschuurmans e98339e
FS-1234; Lint fixes
jakeschuurmans 6c81220
FS-1234; API Tests
jakeschuurmans bc77c24
FS-1234; SQL Boiler code
jakeschuurmans c57fe16
FS-1234; DB Migrations
jakeschuurmans 5f2cbbc
FS-1234; Go Modules
jakeschuurmans f0a153f
FS-1234; Ammendment to SQL Boiler
jakeschuurmans 40eee6a
Revert "FS-1234; Ammendment to SQL Boiler"
jakeschuurmans 2475f84
FS-1234; Removing NULL value availability from schema
jakeschuurmans 4cfd828
FS-1234; Rename ConfigSet to BiosConfigSet, Settings.Custom to Raw
jakeschuurmans 3f4f798
Merge branch 'FS-1234_new' into FS-1234
jakeschuurmans 78ca1af
FS-1234; Deprecate responses
jakeschuurmans a061764
FS-1234; Rename router path
jakeschuurmans 92baa92
FS-1234; Some other refactors
jakeschuurmans 20fe6d3
FS-1234; Fix linting issues
jakeschuurmans aa1b392
FS-1234; Remove Serial
jakeschuurmans File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM alpine:3.19 | ||
FROM golang:1.22-alpine3.19 | ||
|
||
# Copy the binary that goreleaser built | ||
COPY fleetdb /fleetdb | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.19 as builder | ||
FROM golang:1.22 as builder | ||
|
||
# Create and change to the app directory. | ||
WORKDIR /app | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
|
||
CREATE TABLE public.bios_config_sets ( | ||
id UUID NOT NULL PRIMARY KEY DEFAULT gen_random_uuid(), | ||
name STRING UNIQUE NOT NULL, | ||
version STRING NOT NULL, | ||
created_at TIMESTAMPTZ NULL, | ||
updated_at TIMESTAMPTZ NULL | ||
); | ||
|
||
CREATE TABLE public.bios_config_components ( | ||
id UUID NOT NULL PRIMARY KEY DEFAULT gen_random_uuid(), | ||
fk_bios_config_set_id UUID NOT NULL REFERENCES public.bios_config_sets(id) ON DELETE CASCADE, | ||
name STRING NOT NULL, | ||
vendor STRING NOT NULL, | ||
model STRING NOT NULL, | ||
serial STRING NOT NULL, | ||
created_at TIMESTAMPTZ NULL, | ||
updated_at TIMESTAMPTZ NULL, | ||
UNIQUE (fk_bios_config_set_id, name) | ||
); | ||
|
||
CREATE TABLE public.bios_config_settings ( | ||
id UUID NOT NULL PRIMARY KEY DEFAULT gen_random_uuid(), | ||
fk_bios_config_component_id UUID NOT NULL REFERENCES public.bios_config_components(id) ON DELETE CASCADE, | ||
settings_key STRING NOT NULL, | ||
settings_value STRING NOT NULL, | ||
raw JSONB NULL, | ||
created_at TIMESTAMPTZ NULL, | ||
updated_at TIMESTAMPTZ NULL, | ||
UNIQUE (fk_bios_config_component_id, settings_key) | ||
); | ||
|
||
-- +goose StatementEnd | ||
|
||
-- +goose Down | ||
-- +goose StatementBegin | ||
|
||
DROP TABLE public.bios_config_settings; | ||
DROP TABLE public.bios_config_components; | ||
DROP TABLE public.bios_config_sets; | ||
|
||
-- +goose StatementEnd |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
getting the CRDB error because the deprecated "crdb drop" command is no longer deprecated, and is now gone. The SQLBoiler version we use still uses drop.
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.
I'd like us to roll forward with versions and not use older ones in testing.
When you say SQLBoiler, I guess you're referring to the CrDB driver, specifically this https://github.com/metal-toolbox/sqlboiler-crdb/blob/18c5774bdcce987f22ef5ea1b542c2e390faae78/driver/override/templates_test/singleton/crdb_main_test.go.tpl#L56
Can you take a look if that can be updated - as a separate issue.
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.
We have a ticket for it. FS-1400