Update Drupal Debug Hints authored by Tom Wiesing's avatar Tom Wiesing
...@@ -54,3 +54,26 @@ mysql --host=localhost --port=3306 --password --user=username ...@@ -54,3 +54,26 @@ mysql --host=localhost --port=3306 --password --user=username
``` ```
and load an sql file with `source [filename]`. and load an sql file with `source [filename]`.
# Fix Behaim IDs when someone breaks them
```
PREFIX owl: <http://www.w3.org/2002/07/owl#>
INSERT {
GRAPH ?g {
?x owl:sameAs ?newid .
?newid owl:sameAs ?x
}
} WHERE {
GRAPH ?g {
# select old node ids
?x a <http://erlangen-crm.org/120111/E31_Document> .
?x <http://erlangen-crm.org/120111/P48_has_preferred_identifier> ?y .
?y a <http://erlangen-crm.org/120111/E42_Identifier> .
?y <http://erlangen-crm.org/120111/P3_has_note> ?id .
# create proper new URIS
BIND( uri(CONCAT("http://wisski.cs.fau.de/behaim/node/", str(?id))) as ?newid)
}
}
```
\ No newline at end of file