mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 14:52:55 +00:00
Merge pull request #6324 from trofi/selfref-ca-index
ca: add sqlite index on `RealisationsRefs(realisationReference)`
This commit is contained in:
commit
0155a3b3da
@ -32,6 +32,8 @@ create table if not exists RealisationsRefs (
|
||||
foreign key (referrer) references Realisations(id) on delete cascade,
|
||||
foreign key (realisationReference) references Realisations(id) on delete restrict
|
||||
);
|
||||
-- used by deletion trigger
|
||||
create index if not exists IndexRealisationsRefsRealisationReference on RealisationsRefs(realisationReference);
|
||||
|
||||
-- used by QueryRealisationReferences
|
||||
create index if not exists IndexRealisationsRefs on RealisationsRefs(referrer);
|
||||
|
@ -152,6 +152,8 @@ void migrateCASchema(SQLite& db, Path schemaPath, AutoCloseFD& lockFd)
|
||||
select id from Realisations where outputPath = old.id
|
||||
);
|
||||
end;
|
||||
-- used by deletion trigger
|
||||
create index if not exists IndexRealisationsRefsRealisationReference on RealisationsRefs(realisationReference);
|
||||
)");
|
||||
txn.commit();
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ source common.sh
|
||||
|
||||
file=build-hook-ca-floating.nix
|
||||
|
||||
enableFeatures "ca-derivations ca-references"
|
||||
enableFeatures "ca-derivations"
|
||||
|
||||
CONTENT_ADDRESSED=true
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
source ../common.sh
|
||||
|
||||
enableFeatures "ca-derivations ca-references"
|
||||
enableFeatures "ca-derivations"
|
||||
|
||||
restartDaemon
|
||||
|
@ -4,7 +4,7 @@ source common.sh
|
||||
|
||||
requireDaemonNewerThan "2.4pre20210626"
|
||||
|
||||
sed -i 's/experimental-features .*/& ca-derivations ca-references nix-command flakes/' "$NIX_CONF_DIR"/nix.conf
|
||||
enableFeatures "ca-derivations nix-command flakes"
|
||||
|
||||
export NIX_TESTS_CA_BY_DEFAULT=1
|
||||
cd ..
|
||||
|
@ -3,7 +3,7 @@ source common.sh
|
||||
clearStore
|
||||
clearProfiles
|
||||
|
||||
enableFeatures "ca-derivations ca-references"
|
||||
enableFeatures "ca-derivations"
|
||||
restartDaemon
|
||||
|
||||
# Make a flake.
|
||||
|
Loading…
Reference in New Issue
Block a user