From 6baa2a2f5ef5b11859b95f453338efaf7c5b2724 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 24 Feb 2010 14:39:52 +0000 Subject: [PATCH] --- src/libstore/schema.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstore/schema.sql b/src/libstore/schema.sql index 4adad34b7..7438632ed 100644 --- a/src/libstore/schema.sql +++ b/src/libstore/schema.sql @@ -22,7 +22,7 @@ create index if not exists IndexReference on Refs(reference); -- ValidPaths to cause a foreign key constraint violation (due to `on -- delete restrict' on the `reference' column). Therefore, explicitly -- get rid of self-references. -create trigger DeleteSelfRefs before delete on ValidPaths +create trigger if not exists DeleteSelfRefs before delete on ValidPaths begin delete from Refs where referrer = old.id and reference = old.id; end;