diff options
author | Matthew Kenigsberg <matthewkenigsberg@gmail.com> | 2021-09-15 11:51:52 -0500 |
---|---|---|
committer | Matthew Kenigsberg <matthewkenigsberg@gmail.com> | 2021-09-15 11:58:06 -0500 |
commit | 3b82c1a5fef521ebadea5df12384390c8c24100c (patch) | |
tree | 67fd413bcf0b42c5ada7eddc41a04f7bd99df3a8 /src/libstore/ca-specific-schema.sql | |
parent | e023c985d58094041e74ff59a51757bc75687ca7 (diff) | |
parent | d2c8eed34496b650935e4563ffe3174978bd22fc (diff) |
Merge remote-tracking branch 'upstream/master' into auto-uid-allocation
Diffstat (limited to 'src/libstore/ca-specific-schema.sql')
-rw-r--r-- | src/libstore/ca-specific-schema.sql | 11 |
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 +); |