From b4208f0d0a25a46b114eacd457f5cb6e57c9e38c Mon Sep 17 00:00:00 2001 From: Oscar Rodriguez Villalobos Date: Thu, 21 Dec 2023 15:42:44 +0100 Subject: [PATCH] Fix duplicate lang strings --- ...31221132600-fix-duplicate-lang-strings.sparql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 config/migrations/2023/20231221132600-fix-duplicate-lang-strings.sparql diff --git a/config/migrations/2023/20231221132600-fix-duplicate-lang-strings.sparql b/config/migrations/2023/20231221132600-fix-duplicate-lang-strings.sparql new file mode 100644 index 0000000..3634f8c --- /dev/null +++ b/config/migrations/2023/20231221132600-fix-duplicate-lang-strings.sparql @@ -0,0 +1,16 @@ +DELETE +{ + GRAPH ?g { + ?s ?p ?oLang. + } +} +WHERE { + GRAPH ?g { + ?s ?p ?oLang. + ?a ?b ?o . + } + + BIND(LANG(?oLang) as ?lang) + FILTER(STRLEN(STR(?lang)) > 0) + FILTER(STR(?oLang) = ?o) +} \ No newline at end of file