Fix user deletion (again) (again) (notifications_deliveries) (#5112)

Doesn't seem to work fully with notification IDs, not sure why.
This commit is contained in:
Emma Alexia
2026-01-13 17:25:00 -05:00
committed by GitHub
parent 6030cb560c
commit 50a87ba933
3 changed files with 10 additions and 5 deletions

5
.idea/code.iml generated
View File

@@ -12,6 +12,11 @@
<sourceFolder url="file://$MODULE_DIR$/packages/app-lib/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/ariadne/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/path-util/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/modrinth-log/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/modrinth-maxmind/examples" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/modrinth-maxmind/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/modrinth-util/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/muralpay/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />

View File

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

View File

@@ -576,9 +576,9 @@ impl DBUser {
sqlx::query!(
"
DELETE FROM notifications_deliveries
WHERE notification_id = ANY($1)
WHERE user_id = $1
",
&notifications
id as DBUserId
)
.execute(&mut **transaction)
.await?;