Fix user deletion with new notification_deliveries table (#4437)

This commit is contained in:
Emma Alexia
2025-09-29 14:04:22 -04:00
committed by GitHub
parent 7eace32d93
commit 324ad65d7c
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
{
"db_name": "PostgreSQL",
"query": "\n DELETE FROM notifications_deliveries\n WHERE notification_id = ANY($1)\n ",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Int8Array"
]
},
"nullable": []
},
"hash": "73c04dd1b08f2c738b8b818b986dbf0431915cd603e60eec6459ce0a84948616"
}

View File

@@ -579,6 +579,16 @@ impl DBUser {
.execute(&mut **transaction)
.await?;
sqlx::query!(
"
DELETE FROM notifications_deliveries
WHERE notification_id = ANY($1)
",
&notifications
)
.execute(&mut **transaction)
.await?;
let user_collections = sqlx::query!(
"
SELECT id