remove ontology

22 views
Skip to first unread message

Lily Pregill

unread,
Apr 27, 2020, 10:08:10 PM4/27/20
to Arches Project
Hi,

We have multiple versions of an ontology loaded in a v.5 instance. I'm doing a little house-keeping and would like to remove the unused, old ontology version. I checked the documentation but didn't see a command to remove an ontology, only to load one. Suggestions on how to accomplish this would be very much appreciated. 

Thank you!
Lily

Adam Lodge

unread,
Apr 28, 2020, 1:47:38 PM4/28/20
to Lily Pregill, Arches Project
Hi Lily,

You are right.  There is no Arches command, but I’ve done it before with sql.  I’ll write something for you and send it your way.

Best,
Adam

---
Adam Lodge
Geospatial Systems Consultant
Farallon Geographics

--
-- To post, send email to arches...@googlegroups.com. To unsubscribe, send email to archesprojec...@googlegroups.com. For more information, visit https://groups.google.com/d/forum/archesproject?hl=en
---
You received this message because you are subscribed to the Google Groups "Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to archesprojec...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/archesproject/da14ee53-3ca7-4669-902d-5054f5ec596e%40googlegroups.com.

Adam Lodge

unread,
Apr 28, 2020, 2:46:37 PM4/28/20
to Lily Pregill, Arches Project
Lily,

The basics are this:

***
delete from ontologies cascade
where [some condition is met]
***

A few points of note:
- This will delete all ontologies meeting the where condition and any child records in other tables containing those ontologyid’s as foreign keys.

- On the where condition, you will likely filter on ontologyid or name.

- Before running the sql, delete any models or branches that reference the ontology you want to delete.  If you don’t do that, this statement may delete them, but I can’t predict the consequences.

- Probably obvious, but be sure to have a backout plan (like a db backup) in case of unintended consequences.

Good luck!
Adam

---
Adam Lodge
Geospatial Systems Consultant
Farallon Geographics

Lily Pregill

unread,
Apr 28, 2020, 11:19:13 PM4/28/20
to Adam Lodge, Lily Pregill, Arches Project
Terrific! Thanks, Adam. I’ll give it a go tomorrow. 

Best,
Lily 

On Apr 28, 2020, at 11:46 AM, Adam Lodge <alo...@fargeo.com> wrote:


Reply all
Reply to author
Forward
0 new messages