From c19cd5b2e8b8699599614073c482f9722198ed98 Mon Sep 17 00:00:00 2001 From: Ryan Yanulites Date: Tue, 6 Aug 2024 16:16:09 -0600 Subject: [PATCH] add table comments per most recent migration PR --- .../20240806142109_add_resource_mapping_groups.sql | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/service/policy/db/migrations/20240806142109_add_resource_mapping_groups.sql b/service/policy/db/migrations/20240806142109_add_resource_mapping_groups.sql index 4ef74dcda..cbd02dfd6 100644 --- a/service/policy/db/migrations/20240806142109_add_resource_mapping_groups.sql +++ b/service/policy/db/migrations/20240806142109_add_resource_mapping_groups.sql @@ -8,8 +8,15 @@ CREATE TABLE IF NOT EXISTS resource_mapping_groups ( UNIQUE(namespace_id, name) ); +COMMENT ON TABLE resource_mapping_groups IS 'Table to store the groups of resource mappings by unique namespace and group name combinations'; +COMMENT ON COLUMN resource_mapping_groups.id IS 'Primary key for the table'; +COMMENT ON COLUMN resource_mapping_groups.namespace_id IS 'Foreign key to the namespace of the attribute'; +COMMENT ON COLUMN resource_mapping_groups.name IS 'Name for the group of resource mappings'; + ALTER TABLE resource_mappings ADD COLUMN group_id UUID REFERENCES resource_mapping_groups(id) ON DELETE SET NULL; +COMMENT ON COLUMN resource_mappings.group_id IS 'Foreign key to the parent group of the resource mapping'; + -- +goose StatementEnd -- +goose Down