Open TheEgghead27 opened 2 years ago
There's no single public API/SQL command afaik. For now best option would be to use an SQL client to delete the entries.
Note: use this under your own risk.
Steps:
docker-compose exec db sh -c 'MYSQL_PWD=$MYSQL_ROOT_PASSWORD mysqldump $MYSQL_DATABASE' -- > backup.sql
docker-compose exec db sh -c 'MYSQL_PWD=$MYSQL_ROOT_PASSWORD mysql $MYSQL_DATABASE'
. DELETE FROM user_roles WHERE user_uuid = (SELECT uuid FROM users WHERE email="<YOUR_EMAIL>");
DELETE FROM user_subscriptions WHERE user_uuid = (SELECT uuid FROM users WHERE email="<YOUR_EMAIL>");
DELETE FROM revisions WHERE item_uuid IN ( SELECT uuid FROM items WHERE user_uuid = (SELECT uuid FROM users WHERE email= "<YOUR_EMAIL>") );
DELETE FROM items WHERE user_uuid = (SELECT uuid FROM users WHERE email= "<YOUR_EMAIL>");
DELETE FROM sessions WHERE user_uuid = (SELECT uuid FROM users WHERE email= "<YOUR_EMAIL>");
DELETE FROM users WHERE email= "<YOUR_EMAIL>";
+1 this should work with the native 'delete account' button in client apps
Service Versions (please complete the following information): Paste the output of
./server.sh version
. For example:Describe the issue Hello, I had accidentally registered an account on my self-hosted instance with a typo in the account's email, and I was wondering what the proper way to delete said account would be, since the Standard Notes client does not offer this, and the official Standard Notes instance uses its own separate page for account deletion. Is there an API endpoint or SQL command to completely delete an account's data, and if so, would it be possible for it to be documented?