database schema adjustments to server/realm/scene

This commit is contained in:
Evan Carroll 2026-01-16 10:57:47 -06:00
parent a102c96bb4
commit 09590edd95
79 changed files with 7100 additions and 100 deletions

View file

@ -23,7 +23,7 @@ pub async fn list_user_inventory<'e>(
is_droppable,
origin,
acquired_at
FROM props.inventory
FROM auth.inventory
WHERE user_id = $1
ORDER BY acquired_at DESC
"#,
@ -48,11 +48,11 @@ pub async fn drop_inventory_item<'e>(
r#"
WITH item_info AS (
SELECT id, is_droppable
FROM props.inventory
FROM auth.inventory
WHERE id = $1 AND user_id = $2
),
deleted AS (
DELETE FROM props.inventory
DELETE FROM auth.inventory
WHERE id = $1 AND user_id = $2 AND is_droppable = true
RETURNING id
)