[ckan-discuss] CKAN - how to create a previously deleted group

Fawcett, David (MNIT) David.Fawcett at state.mn.us
Wed Aug 14 14:50:07 BST 2013


The issue is that even though the group has been deleted, it is still in the database and there is a unique constraint on group names.  

There are two options that I can think of:

1. If you are using the latest version of the API, there is a new route for purging groups.  This should remove it from the database and get rid of the uniqueness issue.

2.  If you know that you are never going to use that deleted group again, you could change the name of the group to eliminate the conflict.  You should be able to do this using the package_update route of the API. http://docs.ckan.org/en/latest/api.html?highlight=group#ckan.logic.action.update.package_update  If that doesn't work, you could write SQL to change the name of the group directly in the database, but I would not recommend this approach at all.  You really don't want to touch the db except via the API.  This case would be relatively simple, but in most cases, you could 'corrupt' the database.  There is definitely a good reason that there is an API.


-----Original Message-----
From: ckan-discuss-bounces at lists.okfn.org [mailto:ckan-discuss-bounces at lists.okfn.org] On Behalf Of Michael Bauer
Sent: Wednesday, August 14, 2013 4:03 AM
To: ckan-discuss at lists.okfn.org
Subject: [ckan-discuss] CKAN - how to create a previously deleted group



I created a group, then deleted it, and now when I want to create it again I get the following error:

The form contains invalid entries:
Name: Group name already exists in database


Data Diva | skype: mihi_tr | @mihi_tr
The Open Knowledge Foundation | School of Data http://okfn.org | http://schoolofdata.org GPG/PGP key: http://tentacleriot.eu/mihi.asc

ckan-discuss mailing list
ckan-discuss at lists.okfn.org
Unsubscribe: http://lists.okfn.org/mailman/options/ckan-discuss

More information about the ckan-discuss mailing list