Skip to content
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

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions db/migrations/00021_bom.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-- +goose Up
-- +goose StatementBegin

CREATE TABLE bom_info (
serial_num STRING PRIMARY KEY NOT NULL,
aoc_mac_address STRING NULL,
bmc_mac_address STRING NULL,
num_defi_pmi STRING NULL,
num_def_pwd STRING NULL,
metro STRING NULL
);

CREATE TABLE aoc_mac_address (
aoc_mac_address STRING PRIMARY KEY NOT NULL,
serial_num STRING NOT NULL REFERENCES bom_info(serial_num) ON DELETE CASCADE
);

CREATE TABLE bmc_mac_address (
bmc_mac_address STRING PRIMARY KEY NOT NULL,
serial_num STRING NOT NULL REFERENCES bom_info(serial_num) ON DELETE CASCADE
);


-- +goose StatementEnd

-- +goose Down
-- +goose StatementBegin

DROP TABLE bom_info;
DROP TABLE aoc_mac_address;
DROP TABLE bmc_mac_address;

-- +goose StatementEnd
Loading
Loading