Skip to content

Commit

Permalink
add table comments per most recent migration PR
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanulit committed Aug 6, 2024
1 parent 4af6028 commit c19cd5b
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c19cd5b

Please sign in to comment.