diff --git a/migrations/000006_create_controls_table.down.sql b/migrations/000006_create_controls_table.down.sql new file mode 100644 index 00000000..57e0dc9b --- /dev/null +++ b/migrations/000006_create_controls_table.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS controls; diff --git a/migrations/000006_create_controls_table.up.sql b/migrations/000006_create_controls_table.up.sql new file mode 100644 index 00000000..1ca8c096 --- /dev/null +++ b/migrations/000006_create_controls_table.up.sql @@ -0,0 +1,9 @@ +CREATE TABLE IF NOT EXISTS controls ( + id uuid PRIMARY KEY, + name VARCHAR(255), + severity VARCHAR(50), + profile_id UUID, + metadata_id UUID, + CONSTRAINT fk_controls_metadata_id FOREIGN KEY (metadata_id) REFERENCES metadata (id) + CONSTRAINT fk_controls_profile_id FOREIGN KEY (profile_id) REFERENCES profile (id) +);