aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/ca-specific-schema.sql
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-05-07 13:57:01 +0200
committerregnat <rg@regnat.ovh>2021-05-26 16:59:09 +0200
commiteca6ff06d611ef005e80d419e1b6050393fc056d (patch)
tree2956208b2915c61937ae589f285610bf1391e897 /src/libstore/ca-specific-schema.sql
parent7ce0441d806d12bb073047337545e3901404996d (diff)
Store the realisation deps on the local store
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
+);