Skip to content

Commit 9069943

Browse files
Modify iscomplex field in dim_mappingkeys inserts
Updated SQL insert statements to set 'iscomplex' to true for specific citation types in the dim_mappingkeys table.
1 parent 7c4b165 commit 9069943

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

database update scripts/4.1.0-4.2.0.sql

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ WHERE NOT EXISTS (select * from public.dim_mappingkeys where concept=(select id
295295
--projects
296296

297297
INSERT INTO public.dim_mappingkeys (name,description, url, optional, iscomplex, concept, xpath)
298-
SELECT 'Projects','Dataset projects of citation string.', '', true, false, (select id from dim_mappingconcepts where name='Citation_RIS'), 'data/projects'
298+
SELECT 'Projects','Dataset projects of citation string.', '', true, true, (select id from dim_mappingconcepts where name='Citation_RIS'), 'data/projects'
299299
WHERE NOT EXISTS (select * from public.dim_mappingkeys where concept=(select id from dim_mappingconcepts where name='Citation_RIS') AND xpath='data/projects');
300300

301301
INSERT INTO public.dim_mappingkeys (name,description, url, optional, iscomplex, concept,parentRef, xpath)
@@ -306,7 +306,7 @@ SELECT 'Project','Dataset project of citation string.', '', true, false,
306306
WHERE NOT EXISTS (select * from public.dim_mappingkeys where concept=(select id from dim_mappingconcepts where name='Citation_RIS') AND xpath='data/projects/project');
307307

308308
INSERT INTO public.dim_mappingkeys (name,description, url, optional, iscomplex, concept, xpath)
309-
SELECT 'Projects','Dataset projects of citation string.', '', true, false, (select id from dim_mappingconcepts where name='Citation_Bibtex'), 'data/projects'
309+
SELECT 'Projects','Dataset projects of citation string.', '', true, true, (select id from dim_mappingconcepts where name='Citation_Bibtex'), 'data/projects'
310310
WHERE NOT EXISTS (select * from public.dim_mappingkeys where concept=(select id from dim_mappingconcepts where name='Citation_Bibtex') AND xpath='data/projects');
311311

312312
INSERT INTO public.dim_mappingkeys (name,description, url, optional, iscomplex, concept,parentRef, xpath)
@@ -317,7 +317,7 @@ SELECT 'Project','Dataset project of citation string.', '', true, false,
317317
WHERE NOT EXISTS (select * from public.dim_mappingkeys where concept=(select id from dim_mappingconcepts where name='Citation_Bibtex') AND xpath='data/projects/project');
318318

319319
INSERT INTO public.dim_mappingkeys (name,description, url, optional, iscomplex, concept, xpath)
320-
SELECT 'Projects','Dataset projects of citation string.', '', true, false, (select id from dim_mappingconcepts where name='Citation_APA'), 'data/projects'
320+
SELECT 'Projects','Dataset projects of citation string.', '', true, true, (select id from dim_mappingconcepts where name='Citation_APA'), 'data/projects'
321321
WHERE NOT EXISTS (select * from public.dim_mappingkeys where concept=(select id from dim_mappingconcepts where name='Citation_APA') AND xpath='data/projects');
322322

323323
INSERT INTO public.dim_mappingkeys (name,description, url, optional, iscomplex, concept,parentRef, xpath)
@@ -328,7 +328,7 @@ SELECT 'Project','Dataset project of citation string.', '', true, false,
328328
WHERE NOT EXISTS (select * from public.dim_mappingkeys where concept=(select id from dim_mappingconcepts where name='Citation_APA') AND xpath='data/projects/project');
329329

330330
INSERT INTO public.dim_mappingkeys (name,description, url, optional, iscomplex, concept, xpath)
331-
SELECT 'Projects','Dataset projects of citation string.', '', true, false, (select id from dim_mappingconcepts where name='Citation_Text'), 'data/projects'
331+
SELECT 'Projects','Dataset projects of citation string.', '', true, true, (select id from dim_mappingconcepts where name='Citation_Text'), 'data/projects'
332332
WHERE NOT EXISTS (select * from public.dim_mappingkeys where concept=(select id from dim_mappingconcepts where name='Citation_Text') AND xpath='data/projects');
333333

334334
INSERT INTO public.dim_mappingkeys (name,description, url, optional, iscomplex, concept,parentRef, xpath)
@@ -341,7 +341,7 @@ WHERE NOT EXISTS (select * from public.dim_mappingkeys where concept=(select id
341341
--authorNames
342342

343343
INSERT INTO public.dim_mappingkeys (name,description, url, optional, iscomplex, concept, xpath)
344-
SELECT 'AuthorNames','Dataset author names of citation string.', '', false, false, (select id from dim_mappingconcepts where name='Citation_RIS'), 'data/authorNames'
344+
SELECT 'AuthorNames','Dataset author names of citation string.', '', false, true, (select id from dim_mappingconcepts where name='Citation_RIS'), 'data/authorNames'
345345
WHERE NOT EXISTS (select * from public.dim_mappingkeys where concept=(select id from dim_mappingconcepts where name='Citation_RIS') AND xpath='data/authorNames');
346346

347347
INSERT INTO public.dim_mappingkeys (name,description, url, optional, iscomplex, concept,parentRef, xpath)
@@ -352,7 +352,7 @@ SELECT 'AuthorName','Dataset author name of citation string.', '', false, false,
352352
WHERE NOT EXISTS (select * from public.dim_mappingkeys where concept=(select id from dim_mappingconcepts where name='Citation_RIS') AND xpath='data/authorNames/authorName');
353353

354354
INSERT INTO public.dim_mappingkeys (name,description, url, optional, iscomplex, concept, xpath)
355-
SELECT 'AuthorNames','Dataset author names of citation string.', '', false, false, (select id from dim_mappingconcepts where name='Citation_Bibtex'), 'data/authorNames'
355+
SELECT 'AuthorNames','Dataset author names of citation string.', '', false, true, (select id from dim_mappingconcepts where name='Citation_Bibtex'), 'data/authorNames'
356356
WHERE NOT EXISTS (select * from public.dim_mappingkeys where concept=(select id from dim_mappingconcepts where name='Citation_Bibtex') AND xpath='data/authorNames');
357357

358358
INSERT INTO public.dim_mappingkeys (name,description, url, optional, iscomplex, concept,parentRef, xpath)
@@ -363,7 +363,7 @@ SELECT 'AuthorName','Dataset author name of citation string.', '', false, false,
363363
WHERE NOT EXISTS (select * from public.dim_mappingkeys where concept=(select id from dim_mappingconcepts where name='Citation_Bibtex') AND xpath='data/authorNames/authorName');
364364

365365
INSERT INTO public.dim_mappingkeys (name,description, url, optional, iscomplex, concept, xpath)
366-
SELECT 'AuthorNames','Dataset author names of citation string.', '', false, false, (select id from dim_mappingconcepts where name='Citation_APA'), 'data/authorNames'
366+
SELECT 'AuthorNames','Dataset author names of citation string.', '', false, true, (select id from dim_mappingconcepts where name='Citation_APA'), 'data/authorNames'
367367
WHERE NOT EXISTS (select * from public.dim_mappingkeys where concept=(select id from dim_mappingconcepts where name='Citation_APA') AND xpath='data/authorNames');
368368

369369
INSERT INTO public.dim_mappingkeys (name,description, url, optional, iscomplex, concept,parentRef, xpath)
@@ -374,7 +374,7 @@ SELECT 'AuthorName','Dataset author name of citation string.', '', false, false,
374374
WHERE NOT EXISTS (select * from public.dim_mappingkeys where concept=(select id from dim_mappingconcepts where name='Citation_APA') AND xpath='data/authorNames/authorName');
375375

376376
INSERT INTO public.dim_mappingkeys (name,description, url, optional, iscomplex, concept, xpath)
377-
SELECT 'AuthorNames','Dataset author names of citation string.', '', false, false, (select id from dim_mappingconcepts where name='Citation_Text'), 'data/authorNames'
377+
SELECT 'AuthorNames','Dataset author names of citation string.', '', false, true, (select id from dim_mappingconcepts where name='Citation_Text'), 'data/authorNames'
378378
WHERE NOT EXISTS (select * from public.dim_mappingkeys where concept=(select id from dim_mappingconcepts where name='Citation_Text') AND xpath='data/authorNames');
379379

380380
INSERT INTO public.dim_mappingkeys (name,description, url, optional, iscomplex, concept,parentRef, xpath)

0 commit comments

Comments
 (0)