diff --git a/ckan/docker-entrypoint.d/common_vocabulary_tags.csv b/ckan/docker-entrypoint.d/common_vocabulary_tags.csv index 7654e4ba..ae0e10ee 100644 --- a/ckan/docker-entrypoint.d/common_vocabulary_tags.csv +++ b/ckan/docker-entrypoint.d/common_vocabulary_tags.csv @@ -1073,4 +1073,11 @@ http://purl.org/zonmw/covid19/10006,regional,en http://purl.org/zonmw/generic/10006,other,en https://ncit.nci.nih.gov/ncitbrowser/ConceptReport.jsp?dictionary=NCI_Thesaurus&code=C9245,Invasive Breast Carcinoma,en https://ncim.nci.nih.gov/ncimbrowser/ConceptReport.jsp?code=C0853879,Invasive Breast Carcinoma,en -http://purl.bioontology.org/ontology/ICD10CM/J96.2,Acute and chronic respiratory failure,en \ No newline at end of file +http://purl.bioontology.org/ontology/ICD10CM/J96.2,Acute and chronic respiratory failure,en +access_rights,Access Rights,en +organization,Catalogues,en +publisher_name,Publishers,en +res_format,File Formats,en +spatial,Spatial Coverage,en +tags,Keywords,en +theme,Themes,en \ No newline at end of file diff --git a/ckan/docker-entrypoint.d/upload_vocabulary.sh b/ckan/docker-entrypoint.d/upload_vocabulary.sh index 88c0d1ca..40518dfb 100644 --- a/ckan/docker-entrypoint.d/upload_vocabulary.sh +++ b/ckan/docker-entrypoint.d/upload_vocabulary.sh @@ -12,7 +12,12 @@ psql postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432/$CKAN_DB EXISTS(SELECT 1 FROM public.term_translation) as table_not_empty \gset \if :table_not_empty - \echo 'term_translation table is not empty, skipping' + \echo 'term_translation table is not empty, updating' + create table public.temp (term text, term_translation text, lang_code text); + \copy public.temp FROM '/docker-entrypoint.d/common_vocabulary_tags.csv' WITH (DELIMITER ',', FORMAT CSV, HEADER TRUE); + delete from public.term_translation using public.temp where public.term_translation.term = public.temp.term and public.term_translation.term_translation = public.temp.term_translation and public.term_translation.lang_code = public.temp.lang_code; + insert into public.term_translation (term, term_translation, lang_code) select term, term_translation, lang_code from public.temp; + drop table public.temp; \else \copy public.term_translation FROM '/docker-entrypoint.d/common_vocabulary_tags.csv' WITH (DELIMITER ',', FORMAT CSV, HEADER TRUE); \echo 'term_translation initialized with common_vocabulary_tags.csv'