Forum OpenACS Development: integrity violation

Collapse
Posted by Sid Widge on
I get the following error ERROR: cr_type_children_parent_fk referential integrity violation - key in acs_object_types still referenced from cr_type_children from this code
create function inline_10 ()
returns integer as'
begin
  PERFORM acs_object_type__drop_type(''cr_wp_presentation'',''f'');
  PERFORM
acs_object_type__drop_type(''cr_wp_presentation_audience'',''f'');
  PERFORM
acs_object_type__drop_type(''cr_wp_presentation_background'',''f'');
  PERFORM acs_object_type__drop_type(''cr_wp_slide'',''f'');
  PERFORM acs_object_type__drop_type(''cr_wp_slide_preamble'',''f'');
  PERFORM acs_object_type__drop_type(''cr_wp_slide_postamble'',''f'');
  PERFORM
acs_object_type__drop_type(''cr_wp_slide_bullet_items'',''f'');
return 0;
end;' language 'plpgsql';
select inline_10 ();
drop function inline_10 ();

Collapse
Posted by Don Baccus on
aD was notorious for forgetting to delete rows referencing tables in their drop scripts.  My guess is that the Oracle script doesn't work, either.  Have you tried it to see if it does?

As far as checking which drop is failing, try inserting RAISE statements after each PERFORM to log NOTICEs to stdout.