2020-10-20 13:14:02 +00:00
|
|
|
-- Extension of the sql schema for content-addressed derivations.
|
|
|
|
-- Won't be loaded unless the experimental feature `ca-derivations`
|
|
|
|
-- is enabled
|
|
|
|
|
|
|
|
create table if not exists Realisations (
|
2021-05-07 11:57:01 +00:00
|
|
|
id integer primary key autoincrement not null,
|
2020-10-20 13:14:02 +00:00
|
|
|
drvPath text not null,
|
|
|
|
outputName text not null, -- symbolic output id, usually "out"
|
|
|
|
outputPath integer not null,
|
2021-03-08 10:56:33 +00:00
|
|
|
signatures text, -- space-separated list
|
2020-10-20 13:14:02 +00:00
|
|
|
foreign key (outputPath) references ValidPaths(id) on delete cascade
|
|
|
|
);
|
2021-05-07 11:57:01 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
);
|