mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
Make sure to delete all the realisation refs
Deleting just one will only work in the test cases where I didn’t bother creating too many of them :p
This commit is contained in:
parent
74d6782a6a
commit
86d7a11c6b
2 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@ create index if not exists IndexRealisations on Realisations(drvPath, outputName
|
||||||
-- realisations
|
-- realisations
|
||||||
create trigger if not exists DeleteSelfRefsViaRealisations before delete on ValidPaths
|
create trigger if not exists DeleteSelfRefsViaRealisations before delete on ValidPaths
|
||||||
begin
|
begin
|
||||||
delete from RealisationsRefs where realisationReference = (
|
delete from RealisationsRefs where realisationReference in (
|
||||||
select id from Realisations where outputPath = old.id
|
select id from Realisations where outputPath = old.id
|
||||||
);
|
);
|
||||||
end;
|
end;
|
||||||
|
|
|
@ -148,7 +148,7 @@ void migrateCASchema(SQLite& db, Path schemaPath, AutoCloseFD& lockFd)
|
||||||
db.exec(R"(
|
db.exec(R"(
|
||||||
create trigger if not exists DeleteSelfRefsViaRealisations before delete on ValidPaths
|
create trigger if not exists DeleteSelfRefsViaRealisations before delete on ValidPaths
|
||||||
begin
|
begin
|
||||||
delete from RealisationsRefs where realisationReference = (
|
delete from RealisationsRefs where realisationReference in (
|
||||||
select id from Realisations where outputPath = old.id
|
select id from Realisations where outputPath = old.id
|
||||||
);
|
);
|
||||||
end;
|
end;
|
||||||
|
|
Loading…
Reference in a new issue