helper script for transition to multiple variants
This commit is contained in:
parent
52ae6ae9a5
commit
aa000b1a94
9
add-variants.sql
Normal file
9
add-variants.sql
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
insert into variant(submission, name) select id, 'out' from submission;
|
||||||
|
|
||||||
|
update out
|
||||||
|
set variant=subquery.variant_id
|
||||||
|
from (select O.id as out_id, V.id as variant_id
|
||||||
|
from out as O, variant as V, submission as S
|
||||||
|
where V.submission = S.id and O.submission = S.id) AS subquery
|
||||||
|
where out.id = subquery.out_id;
|
Loading…
Reference in New Issue
Block a user