Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] Clean db from users without memberships

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] Clean db from users without memberships


Chronological Thread 
  • From: Francesco Malvezzi <>
  • To: Chris Hyzer <>, "" <>
  • Subject: Re: [grouper-users] Clean db from users without memberships
  • Date: Wed, 28 May 2014 16:48:33 +0200
  • Unimore-x-sa-score: -1.2

Il 28/05/2014 15:54, Chris Hyzer ha scritto:
> You want to get rid of entries in grouper_members which arent used anywhere
> else (there are a ton of foreign keys to this table)? I don't think we
> have a utility to do that. I guess you could backup your data, and write a
> script that tries to delete each record in that table in its own
> transaction and if a record fails due to foreign key, then ignore. Or you
> could look at all the foreign keys and write a delete script where the
> record is not used in any foreign key (backup your data for this too
> obviously).
>
> Im not sure I recommend doing either of these though, up to you :)

I tried something like:

delete from grouper_members where subject_source='my-ldap-source' and id
not in (select distinct member_id from grouper_memberships);

but right now I realized the slowness of xmlexport was due to the log
entries (point in time?) so I think I didn't solve anything,

thank you,

Francesco




Archive powered by MHonArc 2.6.16.

Top of Page