aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/ca-specific-schema.sql
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-09-30 22:42:15 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-09-30 22:42:15 +0000
commit9af9ab42126869b0be920db0224b7e1da58342a1 (patch)
tree696cb996c35a75a15729f86ded875a0bcdffdc09 /src/libstore/ca-specific-schema.sql
parentd0ed11ca729344fd00251d0bc31f0c2f32d2c6a7 (diff)
parentf4f3203aa7c2fc9225a8ae220db25593066fb397 (diff)
Merge branch 'path-info' into ca-drv-exotic
Diffstat (limited to 'src/libstore/ca-specific-schema.sql')
-rw-r--r--src/libstore/ca-specific-schema.sql11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libstore/ca-specific-schema.sql b/src/libstore/ca-specific-schema.sql
index 20ee046a1..08af0cc1f 100644
--- a/src/libstore/ca-specific-schema.sql
+++ b/src/libstore/ca-specific-schema.sql
@@ -3,10 +3,19 @@
-- is enabled
create table if not exists Realisations (
+ id integer primary key autoincrement not null,
drvPath text not null,
outputName text not null, -- symbolic output id, usually "out"
outputPath integer not null,
signatures text, -- space-separated list
- primary key (drvPath, outputName),
foreign key (outputPath) references ValidPaths(id) on delete cascade
);
+
+create index if not exists IndexRealisations on Realisations(drvPath, outputName);
+
+create table if not exists RealisationsRefs (
+ referrer integer not null,
+ realisationReference integer,
+ foreign key (referrer) references Realisations(id) on delete cascade,
+ foreign key (realisationReference) references Realisations(id) on delete restrict
+);