about summary refs log tree commit diff
path: root/src/libstore/schema.sql
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-02-22T11·15+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-02-22T11·15+0000
commit299ff64812ce166d230f1b630f794be226c7a178 (patch)
treee09c23e7c49837c09701255bcd8fc09e51a964a8 /src/libstore/schema.sql
parent1930570ad96e47de9e8557a7734c7bfd9f36f942 (diff)
* Put the derivation outputs in the database. This is useful for the
  garbage collector.

Diffstat (limited to 'src/libstore/schema.sql')
-rw-r--r--src/libstore/schema.sql10
1 files changed, 10 insertions, 0 deletions
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