diff options
Diffstat (limited to 'src/libstore/schema.sql')
-rw-r--r-- | src/libstore/schema.sql | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/schema.sql b/src/libstore/schema.sql index 4adad34b700e..7438632edbd9 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; |