Skip to content

Instantly share code, notes, and snippets.

@raprasad
Created June 26, 2017 19:13
Show Gist options
  • Save raprasad/216322bc07780b46ecda97ded72dfc83 to your computer and use it in GitHub Desktop.
Save raprasad/216322bc07780b46ecda97ded72dfc83 to your computer and use it in GitHub Desktop.
remove authenticated users from db

Queries to remove most AuthenticatedUsers

Prereq deletes

delete from usernotification where user_id > 9;
delete from apitoken where authenticateduser_id > 9;
delete from authenticateduserlookup where authenticateduser_id > 9;
delete from confirmemaildata where authenticateduser_id > 9;

Potential delete/update

update dvobject set creator_id = 1;
update datasetversionuser set authenticateduser_id= 1;

Last deletes

delete from authenticateduser where id > 9;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment