Forum OpenACS Development: cr_child_rels sql

Collapse
Posted by David Kuczek on
I am not quite sure about it, but shouldn' parent_id and child_id have a foreign key restraint???

##### original #####

create table cr_child_rels (
  rel_id            integer
                    constraint cr_child_rels_rel_pk
                    primary key
                    constraint cr_child_rels_rel_fk
                    references acs_objects,
  parent_id          integer
                    constraint cr_child_rels_parent_nil
                    not null,
  child_id          integer
                    constraint cr_child_rels_child_nil
                    not null,
  relation_tag      varchar(100),
  order_n            integer
);

Collapse
2: Re: cr_child_rels sql (response to 1)
Posted by Jun Yamog on
Hi David,

I think it should, although from what I know if you use the api to delete (content_item__delete) it will clean up child relations.