Skip to content

Commit

Permalink
insert-into BMC to server-credential-types
Browse files Browse the repository at this point in the history
  • Loading branch information
Alva8756 committed Dec 10, 2023
1 parent a85517f commit 5cfc3f4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions db/migrations/00001_init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ CREATE TABLE public.bmc_mac_address (
FAMILY "primary" (bmc_mac_address, serial_num)
);

INSERT INTO server_credential_types(name, slug, builtin, created_at, updated_at)
VALUES ('BMC', 'bmc', true, now(), now());

ALTER TABLE public.server_components ADD CONSTRAINT fk_server_component_type_id_ref_server_component_types FOREIGN KEY (server_component_type_id) REFERENCES public.server_component_types(id);
ALTER TABLE public.server_components ADD CONSTRAINT fk_server_id_ref_servers FOREIGN KEY (server_id) REFERENCES public.servers(id) ON DELETE CASCADE;
ALTER TABLE public.versioned_attributes ADD CONSTRAINT fk_server_id_ref_servers FOREIGN KEY (server_id) REFERENCES public.servers(id) ON DELETE CASCADE;
Expand Down

0 comments on commit 5cfc3f4

Please sign in to comment.