Continue to implement opinion

improve target reference
Improve Tests for Opinion
fix SQL:upsert_opinion
This commit is contained in:
2020-02-14 01:26:47 +01:00
parent 60bd24e653
commit 471013984c
42 changed files with 683 additions and 137 deletions

View File

@@ -7,7 +7,10 @@ begin
delete from opinion_choice;
insert into opinion_choice (id, name, target)
select uuid_in(md5('opinion_choice'||row_number() over ())::cstring), 'Opinion'||row_number() over (), '{article}'
select
uuid_in(md5('opinion_choice'||row_number() over ())::cstring),
'Opinion'||row_number() over (),
case when row_number() over () % 5 = 0 then null else '{article}'::text[] end
from generate_series(0,20);
for i in 0..9 loop