Question

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

Digging around I realized I can finally rase it from outside ckan. From a pgadmin3 console I have to delete related records in member_revision, member, group_role and finally group table

But doing so I break all the history in the audit tables, and god knows what else.

Is there some politer way to achieve it?

Was it helpful?

Solution

The quickest (and probably dirtiest) way to do this, assuming your group name is my-group:

update group_revision set state='active' where name='my-group' and current=true;
update group set state='active' where name='my-group';

This should keep the audit intact.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top