@@ -88,7 +88,7 @@ drop table if exists DerivationOutputs;
88
88
89
89
create table DerivationOutputs
90
90
(
91
- drv integer not null ,
91
+ drv integer not null , -- index of a path of a derivation in ValidPaths
92
92
id text not null , -- symbolic output id, usually "out"
93
93
path text not null ,
94
94
primary key (drv, id),
@@ -203,14 +203,11 @@ from DerivationOutputs1;
203
203
-- Calculate updated derivation outputs for the second store
204
204
-- =====
205
205
206
- -- drv | id | path
206
+ -- drv | id | path | drvPath
207
207
drop view if exists DerivationIdPaths;
208
208
209
-
210
- -- TODO what is drv?
211
-
212
209
create view DerivationIdPaths as
213
- select drv, DerivationOutputs2 .id , ValidPaths2_ .path
210
+ select drv, DerivationOutputs2 .id , DerivationOutputs2 . path , ValidPaths2_ .path as drvPath
214
211
from DerivationOutputs2
215
212
join (select id, path from ValidPaths2) as ValidPaths2_ on ValidPaths2_ .id = drv;
216
213
@@ -219,9 +216,9 @@ drop view if exists DerivationOutputs2Updated;
219
216
220
217
create view DerivationOutputs2Updated as
221
218
select ValidPaths_ .drvNew as drv, id, DerivationIdPaths_ .path
222
- from (select id, path from DerivationIdPaths) as DerivationIdPaths_
219
+ from (select id, path , drvPath from DerivationIdPaths) as DerivationIdPaths_
223
220
join (select id as drvNew, path from ValidPaths) as ValidPaths_
224
- on DerivationIdPaths_ .path = ValidPaths_ .path ;
221
+ on DerivationIdPaths_ .drvPath = ValidPaths_ .path ;
225
222
226
223
-- =====
227
224
-- Insert updated derivation outputs from the second store
0 commit comments