This commit is contained in:
Eelco Dolstra 2010-02-24 14:39:52 +00:00
parent 9fd85c94de
commit 6baa2a2f5e

View file

@ -22,7 +22,7 @@ create index if not exists IndexReference on Refs(reference);
-- ValidPaths to cause a foreign key constraint violation (due to `on -- ValidPaths to cause a foreign key constraint violation (due to `on
-- delete restrict' on the `reference' column). Therefore, explicitly -- delete restrict' on the `reference' column). Therefore, explicitly
-- get rid of self-references. -- get rid of self-references.
create trigger DeleteSelfRefs before delete on ValidPaths create trigger if not exists DeleteSelfRefs before delete on ValidPaths
begin begin
delete from Refs where referrer = old.id and reference = old.id; delete from Refs where referrer = old.id and reference = old.id;
end; end;