3ac9d74eb1
Add a new table for tracking the derivation output mappings. We used to hijack the `DerivationOutputs` table for that, but (despite its name), it isn't a really good fit: - Its entries depend on the drv being a valid path, making it play badly with garbage collection and preventing us to copy a drv output without copying the whole drv closure too; - It dosen't guaranty that the output path exists; By using a different table, we can experiment with a different schema better suited for tracking the output mappings of CA derivations. (incidentally, this also fixes #4138)
12 lines
433 B
SQL
12 lines
433 B
SQL
-- 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 (
|
|
drvPath text not null,
|
|
outputName text not null, -- symbolic output id, usually "out"
|
|
outputPath integer not null,
|
|
primary key (drvPath, outputName),
|
|
foreign key (outputPath) references ValidPaths(id) on delete cascade
|
|
);
|