Delete the count cache row when a user is deleted (#1103)

This commit is contained in:
Ellie Huxtable
2023-07-14 20:45:10 +01:00
committed by GitHub
parent 5786155969
commit 5d26d3f47a

View File

@ -277,6 +277,12 @@ impl Database for Postgres {
.await
.map_err(fix_error)?;
sqlx::query("delete from total_history_count_user where user_id = $1")
.bind(u.id)
.execute(&self.pool)
.await
.map_err(fix_error)?;
Ok(())
}