Update schemas and resolve some warnings

This commit is contained in:
jude
2024-07-16 10:42:32 +01:00
parent 54ee3594eb
commit febd04c374
26 changed files with 221 additions and 164 deletions

View File

@ -191,8 +191,7 @@ impl ComponentDataModel {
sqlx::query!(
"
SELECT todos.id, value FROM todos
INNER JOIN users ON todos.user_id = users.id
WHERE users.user = ?
WHERE user_id = ?
",
uid,
)
@ -285,10 +284,9 @@ impl ComponentDataModel {
let values = if let Some(uid) = selector.user_id {
sqlx::query!(
"
SELECT todos.id, value FROM todos
INNER JOIN users ON todos.user_id = users.id
WHERE users.user = ?
",
SELECT todos.id, value FROM todos
WHERE user_id = ?
",
uid,
)
.fetch_all(&data.database)