Skip to main content

drop_user_database

Function drop_user_database 

Source
pub async fn drop_user_database(user_id: Uuid) -> Result<(), DBError>
Expand description

Drops a user’s database, used as compensating cleanup when a step after provisioning (e.g. the users row insert) fails and would otherwise orphan the just-created database. Best-effort and idempotent (IF EXISTS).

§Errors

DBError::Sqlx if the DROP DATABASE itself errors (e.g. the database is still in use); callers typically log and continue rather than failing the original error path.