forked from lix-project/lix
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 (referrer) references Realisations(id) on delete cascade,
|
||||||
foreign key (realisationReference) references Realisations(id) on delete restrict
|
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
|
-- used by QueryRealisationReferences
|
||||||
create index if not exists IndexRealisationsRefs on RealisationsRefs(referrer);
|
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
|
select id from Realisations where outputPath = old.id
|
||||||
);
|
);
|
||||||
end;
|
end;
|
||||||
|
-- used by deletion trigger
|
||||||
|
create index if not exists IndexRealisationsRefsRealisationReference on RealisationsRefs(realisationReference);
|
||||||
)");
|
)");
|
||||||
txn.commit();
|
txn.commit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ source common.sh
|
||||||
|
|
||||||
file=build-hook-ca-floating.nix
|
file=build-hook-ca-floating.nix
|
||||||
|
|
||||||
enableFeatures "ca-derivations ca-references"
|
enableFeatures "ca-derivations"
|
||||||
|
|
||||||
CONTENT_ADDRESSED=true
|
CONTENT_ADDRESSED=true
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
source ../common.sh
|
source ../common.sh
|
||||||
|
|
||||||
enableFeatures "ca-derivations ca-references"
|
enableFeatures "ca-derivations"
|
||||||
|
|
||||||
restartDaemon
|
restartDaemon
|
||||||
|
|
|
@ -4,7 +4,7 @@ source common.sh
|
||||||
|
|
||||||
requireDaemonNewerThan "2.4pre20210626"
|
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
|
export NIX_TESTS_CA_BY_DEFAULT=1
|
||||||
cd ..
|
cd ..
|
||||||
|
|
|
@ -3,7 +3,7 @@ source common.sh
|
||||||
clearStore
|
clearStore
|
||||||
clearProfiles
|
clearProfiles
|
||||||
|
|
||||||
enableFeatures "ca-derivations ca-references"
|
enableFeatures "ca-derivations"
|
||||||
restartDaemon
|
restartDaemon
|
||||||
|
|
||||||
# Make a flake.
|
# Make a flake.
|
||||||
|
|
Loading…
Reference in a new issue