DROP TABLE IF EXISTS attribute_group_attribute CASCADE;
CREATE TABLE attribute_group_attribute (
- attributegroup_id bigint REFERENCES attribute_group (id),
- attribute_id bigint REFERENCES attribute(id)
+ attributegroup_id bigint REFERENCES attribute_group (id) on delete cascade,
+ attribute_id bigint REFERENCES attribute(id) on delete cascade
);
CREATE INDEX attribute_group_attribute_idx1 on attribute_group_attribute(attributegroup_id);
CREATE INDEX attribute_group_attribute_idx2 on attribute_group_attribute(attribute_id);