From 299ff64812ce166d230f1b630f794be226c7a178 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <e.dolstra@tudelft.nl>
Date: Mon, 22 Feb 2010 11:15:50 +0000
Subject: * Put the derivation outputs in the database.  This is useful for the
   garbage collector.

---
 src/libstore/schema.sql | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'src/libstore/schema.sql')

diff --git a/src/libstore/schema.sql b/src/libstore/schema.sql
index 1e707ce1f41e..682ce5ed7b26 100644
--- a/src/libstore/schema.sql
+++ b/src/libstore/schema.sql
@@ -17,6 +17,16 @@ create table if not exists Refs (
 create index if not exists IndexReferrer on Refs(referrer);
 create index if not exists IndexReference on Refs(reference);
 
+create table if not exists DerivationOutputs (
+    drv  integer not null,
+    id   text not null, -- symbolic output id, usually "out"
+    path text not null,
+    primary key (drv, id),
+    foreign key (drv) references ValidPaths(id) on delete cascade
+);
+
+create index if not exists IndexDerivationOutputs on DerivationOutputs(path);
+
 create table if not exists FailedPaths (
     path text primary key not null,
     time integer not null
-- 
cgit 1.4.1

