From 3b812946e48f824fadc4d035d885f480b7bdce16 Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Wed, 22 Jan 2025 16:11:59 +0100 Subject: [PATCH] Reorganize migrations and split jobs removal --- ...flush-existing-leidinggevenden-data.sparql | 0 ...flush-existing-leidinggevenden-data.sparql | 0 ...flush-existing-leidinggevenden-data.sparql | 0 ...flush-existing-leidinggevenden-data.sparql | 0 ...flush-existing-leidinggevenden-data.sparql | 0 .../20250113151947-flush-landing-graph.sparql | 0 ...leidinggevenden-consumer-containers.sparql | 37 +++++++++++++++++++ ...ush-leidinggevenden-consumer-tasks.sparql} | 32 ++++------------ ...flush-leidinggevenden-consumer-jobs.sparql | 32 ++++++++++++++++ ...leidinggevenden-consumer-containers.sparql | 37 +++++++++++++++++++ ...lush-leidinggevenden-consumer-tasks.sparql | 34 +++++++++++++++++ ...flush-leidinggevenden-consumer-jobs.sparql | 32 ++++++++++++++++ ...leidinggevenden-consumer-containers.sparql | 34 +++++++++++++++++ ...lush-leidinggevenden-consumer-tasks.sparql | 31 ++++++++++++++++ ...flush-leidinggevenden-consumer-jobs.sparql | 29 +++++++++++++++ 15 files changed, 274 insertions(+), 24 deletions(-) rename config/migrations/2025/{20250113-update-leidinggevenden-consumer => 20250113000000-update-leidinggevenden-consumer}/20250113151927-flush-existing-leidinggevenden-data.sparql (100%) rename config/migrations/2025/{20250113-update-leidinggevenden-consumer => 20250113000000-update-leidinggevenden-consumer}/20250113151928-flush-existing-leidinggevenden-data.sparql (100%) rename config/migrations/2025/{20250113-update-leidinggevenden-consumer => 20250113000000-update-leidinggevenden-consumer}/20250113151929-flush-existing-leidinggevenden-data.sparql (100%) rename config/migrations/2025/{20250113-update-leidinggevenden-consumer => 20250113000000-update-leidinggevenden-consumer}/20250113151930-flush-existing-leidinggevenden-data.sparql (100%) rename config/migrations/2025/{20250113-update-leidinggevenden-consumer => 20250113000000-update-leidinggevenden-consumer}/20250113151931-flush-existing-leidinggevenden-data.sparql (100%) rename config/migrations/2025/{20250113-update-leidinggevenden-consumer => 20250113000000-update-leidinggevenden-consumer}/20250113151947-flush-landing-graph.sparql (100%) create mode 100644 config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2023/20250113152654-flush-leidinggevenden-consumer-containers.sparql rename config/migrations/2025/{20250113-update-leidinggevenden-consumer/20250113152654-flush-old-jobs.sparql => 20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2023/20250113152655-flush-leidinggevenden-consumer-tasks.sparql} (64%) create mode 100644 config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2023/20250113152656-flush-leidinggevenden-consumer-jobs.sparql create mode 100644 config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2024/20250113152657-flush-leidinggevenden-consumer-containers.sparql create mode 100644 config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2024/20250113152658-flush-leidinggevenden-consumer-tasks.sparql create mode 100644 config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2024/20250113152659-flush-leidinggevenden-consumer-jobs.sparql create mode 100644 config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2025/20250113152660-flush-leidinggevenden-consumer-containers.sparql create mode 100644 config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2025/20250113152661-flush-leidinggevenden-consumer-tasks.sparql create mode 100644 config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2025/20250113152662-flush-leidinggevenden-consumer-jobs.sparql diff --git a/config/migrations/2025/20250113-update-leidinggevenden-consumer/20250113151927-flush-existing-leidinggevenden-data.sparql b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113151927-flush-existing-leidinggevenden-data.sparql similarity index 100% rename from config/migrations/2025/20250113-update-leidinggevenden-consumer/20250113151927-flush-existing-leidinggevenden-data.sparql rename to config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113151927-flush-existing-leidinggevenden-data.sparql diff --git a/config/migrations/2025/20250113-update-leidinggevenden-consumer/20250113151928-flush-existing-leidinggevenden-data.sparql b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113151928-flush-existing-leidinggevenden-data.sparql similarity index 100% rename from config/migrations/2025/20250113-update-leidinggevenden-consumer/20250113151928-flush-existing-leidinggevenden-data.sparql rename to config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113151928-flush-existing-leidinggevenden-data.sparql diff --git a/config/migrations/2025/20250113-update-leidinggevenden-consumer/20250113151929-flush-existing-leidinggevenden-data.sparql b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113151929-flush-existing-leidinggevenden-data.sparql similarity index 100% rename from config/migrations/2025/20250113-update-leidinggevenden-consumer/20250113151929-flush-existing-leidinggevenden-data.sparql rename to config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113151929-flush-existing-leidinggevenden-data.sparql diff --git a/config/migrations/2025/20250113-update-leidinggevenden-consumer/20250113151930-flush-existing-leidinggevenden-data.sparql b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113151930-flush-existing-leidinggevenden-data.sparql similarity index 100% rename from config/migrations/2025/20250113-update-leidinggevenden-consumer/20250113151930-flush-existing-leidinggevenden-data.sparql rename to config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113151930-flush-existing-leidinggevenden-data.sparql diff --git a/config/migrations/2025/20250113-update-leidinggevenden-consumer/20250113151931-flush-existing-leidinggevenden-data.sparql b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113151931-flush-existing-leidinggevenden-data.sparql similarity index 100% rename from config/migrations/2025/20250113-update-leidinggevenden-consumer/20250113151931-flush-existing-leidinggevenden-data.sparql rename to config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113151931-flush-existing-leidinggevenden-data.sparql diff --git a/config/migrations/2025/20250113-update-leidinggevenden-consumer/20250113151947-flush-landing-graph.sparql b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113151947-flush-landing-graph.sparql similarity index 100% rename from config/migrations/2025/20250113-update-leidinggevenden-consumer/20250113151947-flush-landing-graph.sparql rename to config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113151947-flush-landing-graph.sparql diff --git a/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2023/20250113152654-flush-leidinggevenden-consumer-containers.sparql b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2023/20250113152654-flush-leidinggevenden-consumer-containers.sparql new file mode 100644 index 0000000..c92f096 --- /dev/null +++ b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2023/20250113152654-flush-leidinggevenden-consumer-containers.sparql @@ -0,0 +1,37 @@ +PREFIX mu: +PREFIX task: +PREFIX dct: +PREFIX prov: +PREFIX nie: +PREFIX ext: +PREFIX oslc: +PREFIX cogs: +PREFIX adms: +PREFIX nfo: +PREFIX dbpedia: + + +DELETE { + GRAPH ?g { + ?container ?containerP ?containerO. + } +} WHERE { + VALUES ?operation { + + + } + + GRAPH ?g { + ?job a ; + task:operation ?operation; + dct:created ?created. + + FILTER(?created < "2024-01-01T00:00:00"^^xsd:dateTime) + + ?task dct:isPartOf ?job; + task:resultsContainer ?container. + + ?container a nfo:DataContainer; + ?containerP ?containerO. + } +} diff --git a/config/migrations/2025/20250113-update-leidinggevenden-consumer/20250113152654-flush-old-jobs.sparql b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2023/20250113152655-flush-leidinggevenden-consumer-tasks.sparql similarity index 64% rename from config/migrations/2025/20250113-update-leidinggevenden-consumer/20250113152654-flush-old-jobs.sparql rename to config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2023/20250113152655-flush-leidinggevenden-consumer-tasks.sparql index d98649a..94475f6 100644 --- a/config/migrations/2025/20250113-update-leidinggevenden-consumer/20250113152654-flush-old-jobs.sparql +++ b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2023/20250113152655-flush-leidinggevenden-consumer-tasks.sparql @@ -13,38 +13,22 @@ PREFIX dbpedia: DELETE { GRAPH ?g { - ?job ?jobP ?jobO. ?task ?taskP ?taskO. - ?container ?containerP ?containerO. } -} -WHERE { +} WHERE { VALUES ?operation { } GRAPH ?g { - { - ?job a ; - task:operation ?operation; - ?jobP ?jobO. + ?job a ; + dct:created ?created; + task:operation ?operation. - ?task dct:isPartOf ?job; - task:resultsContainer ?container; + FILTER(?created < "2024-01-01T00:00:00"^^xsd:dateTime) + + ?task dct:isPartOf ?job; ?taskP ?taskO. - - ?container a nfo:DataContainer; - ?containerP ?containerO. - } - UNION - { - ?job a ; - task:operation ?operation; - ?jobP ?jobO. - - ?task dct:isPartOf ?job; - ?taskP ?taskO. - } } -} \ No newline at end of file +} diff --git a/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2023/20250113152656-flush-leidinggevenden-consumer-jobs.sparql b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2023/20250113152656-flush-leidinggevenden-consumer-jobs.sparql new file mode 100644 index 0000000..52ef4d4 --- /dev/null +++ b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2023/20250113152656-flush-leidinggevenden-consumer-jobs.sparql @@ -0,0 +1,32 @@ +PREFIX mu: +PREFIX task: +PREFIX dct: +PREFIX prov: +PREFIX nie: +PREFIX ext: +PREFIX oslc: +PREFIX cogs: +PREFIX adms: +PREFIX nfo: +PREFIX dbpedia: + + +DELETE { + GRAPH ?g { + ?job ?jobP ?jobO. + } +} WHERE { + VALUES ?operation { + + + } + + GRAPH ?g { + ?job a ; + dct:created ?created; + task:operation ?operation; + ?jobP ?jobO. + + FILTER(?created < "2024-01-01T00:00:00"^^xsd:dateTime) + } +} diff --git a/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2024/20250113152657-flush-leidinggevenden-consumer-containers.sparql b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2024/20250113152657-flush-leidinggevenden-consumer-containers.sparql new file mode 100644 index 0000000..842e847 --- /dev/null +++ b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2024/20250113152657-flush-leidinggevenden-consumer-containers.sparql @@ -0,0 +1,37 @@ +PREFIX mu: +PREFIX task: +PREFIX dct: +PREFIX prov: +PREFIX nie: +PREFIX ext: +PREFIX oslc: +PREFIX cogs: +PREFIX adms: +PREFIX nfo: +PREFIX dbpedia: + + +DELETE { + GRAPH ?g { + ?container ?containerP ?containerO. + } +} WHERE { + VALUES ?operation { + + + } + + GRAPH ?g { + ?job a ; + task:operation ?operation; + dct:created ?created. + + FILTER(?created < "2025-01-01T00:00:00"^^xsd:dateTime) + + ?task dct:isPartOf ?job; + task:resultsContainer ?container. + + ?container a nfo:DataContainer; + ?containerP ?containerO. + } +} diff --git a/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2024/20250113152658-flush-leidinggevenden-consumer-tasks.sparql b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2024/20250113152658-flush-leidinggevenden-consumer-tasks.sparql new file mode 100644 index 0000000..7847429 --- /dev/null +++ b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2024/20250113152658-flush-leidinggevenden-consumer-tasks.sparql @@ -0,0 +1,34 @@ +PREFIX mu: +PREFIX task: +PREFIX dct: +PREFIX prov: +PREFIX nie: +PREFIX ext: +PREFIX oslc: +PREFIX cogs: +PREFIX adms: +PREFIX nfo: +PREFIX dbpedia: + + +DELETE { + GRAPH ?g { + ?task ?taskP ?taskO. + } +} WHERE { + VALUES ?operation { + + + } + + GRAPH ?g { + ?job a ; + dct:created ?created; + task:operation ?operation. + + FILTER(?created < "2025-01-01T00:00:00"^^xsd:dateTime) + + ?task dct:isPartOf ?job; + ?taskP ?taskO. + } +} diff --git a/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2024/20250113152659-flush-leidinggevenden-consumer-jobs.sparql b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2024/20250113152659-flush-leidinggevenden-consumer-jobs.sparql new file mode 100644 index 0000000..4f33643 --- /dev/null +++ b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2024/20250113152659-flush-leidinggevenden-consumer-jobs.sparql @@ -0,0 +1,32 @@ +PREFIX mu: +PREFIX task: +PREFIX dct: +PREFIX prov: +PREFIX nie: +PREFIX ext: +PREFIX oslc: +PREFIX cogs: +PREFIX adms: +PREFIX nfo: +PREFIX dbpedia: + + +DELETE { + GRAPH ?g { + ?job ?jobP ?jobO. + } +} WHERE { + VALUES ?operation { + + + } + + GRAPH ?g { + ?job a ; + dct:created ?created; + task:operation ?operation; + ?jobP ?jobO. + + FILTER(?created < "2025-01-01T00:00:00"^^xsd:dateTime) + } +} diff --git a/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2025/20250113152660-flush-leidinggevenden-consumer-containers.sparql b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2025/20250113152660-flush-leidinggevenden-consumer-containers.sparql new file mode 100644 index 0000000..4d90259 --- /dev/null +++ b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2025/20250113152660-flush-leidinggevenden-consumer-containers.sparql @@ -0,0 +1,34 @@ +PREFIX mu: +PREFIX task: +PREFIX dct: +PREFIX prov: +PREFIX nie: +PREFIX ext: +PREFIX oslc: +PREFIX cogs: +PREFIX adms: +PREFIX nfo: +PREFIX dbpedia: + + +DELETE { + GRAPH ?g { + ?container ?containerP ?containerO. + } +} WHERE { + VALUES ?operation { + + + } + + GRAPH ?g { + ?job a ; + task:operation ?operation. + + ?task dct:isPartOf ?job; + task:resultsContainer ?container. + + ?container a nfo:DataContainer; + ?containerP ?containerO. + } +} diff --git a/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2025/20250113152661-flush-leidinggevenden-consumer-tasks.sparql b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2025/20250113152661-flush-leidinggevenden-consumer-tasks.sparql new file mode 100644 index 0000000..1564173 --- /dev/null +++ b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2025/20250113152661-flush-leidinggevenden-consumer-tasks.sparql @@ -0,0 +1,31 @@ +PREFIX mu: +PREFIX task: +PREFIX dct: +PREFIX prov: +PREFIX nie: +PREFIX ext: +PREFIX oslc: +PREFIX cogs: +PREFIX adms: +PREFIX nfo: +PREFIX dbpedia: + + +DELETE { + GRAPH ?g { + ?task ?taskP ?taskO. + } +} WHERE { + VALUES ?operation { + + + } + + GRAPH ?g { + ?job a ; + task:operation ?operation. + + ?task dct:isPartOf ?job; + ?taskP ?taskO. + } +} diff --git a/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2025/20250113152662-flush-leidinggevenden-consumer-jobs.sparql b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2025/20250113152662-flush-leidinggevenden-consumer-jobs.sparql new file mode 100644 index 0000000..32ae341 --- /dev/null +++ b/config/migrations/2025/20250113000000-update-leidinggevenden-consumer/20250113152654-flush-old-jobs/2025/20250113152662-flush-leidinggevenden-consumer-jobs.sparql @@ -0,0 +1,29 @@ +PREFIX mu: +PREFIX task: +PREFIX dct: +PREFIX prov: +PREFIX nie: +PREFIX ext: +PREFIX oslc: +PREFIX cogs: +PREFIX adms: +PREFIX nfo: +PREFIX dbpedia: + + +DELETE { + GRAPH ?g { + ?job ?jobP ?jobO. + } +} WHERE { + VALUES ?operation { + + + } + + GRAPH ?g { + ?job a ; + task:operation ?operation; + ?jobP ?jobO. + } +}