Deleting users who have uploaded an asset

We are trying to delete a user who have uploaded images but was unable due to foreign key constraints error. We are using the cloud version of Directus and users directly upload images via the Directus interface. Any suggestions of resolving and/or preventing this in the future? Thanks.

1 Like

I came across this issue too but couldn’t find a solution. If you’re self-hosting, you can manually re-assign everything the user did by manipulating the database directly (it won’t just apply to files they uploaded but literally everything they added or updated), but no way of doing that on cloud. I just set the user in question to “archived” which seemed more sensible than trying to erase their whole history.

My general recommendation is to archive instead of fully delete users whenever possible. This ensures that you don’t lose any of the accountability and data provenance. We currently don’t have a seamless way to automatically re-assign all of the user’s uploads to another user, but I do have a feature request high on my todo list to get to that sometime soon. I’ve made sure to make a note of your comment there as well. Ty!