2020-10-20 16:14:02 +03: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 14:57:01 +03:00
|
|
|
id integer primary key autoincrement not null,
|
2020-10-20 16:14:02 +03:00
|
|
|
drvPath text not null,
|
|
|
|
outputName text not null, -- symbolic output id, usually "out"
|
|
|
|
outputPath integer not null,
|
2021-03-08 12:56:33 +02:00
|
|
|
signatures text, -- space-separated list
|
2020-10-20 16:14:02 +03:00
|
|
|
foreign key (outputPath) references ValidPaths(id) on delete cascade
|
|
|
|
);
|
2021-05-07 14:57:01 +03: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
|
|
|
|
);
|