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

@ -17,10 +17,7 @@ impl Recordable for Options {
sqlx::query!(
"
INSERT INTO todos (user_id, value)
VALUES (
(SELECT id FROM users WHERE user = ?),
?
)
VALUES (?, ?)
",
ctx.author().id.get(),
self.task

View File

@ -14,8 +14,7 @@ impl Recordable for Options {
let values = sqlx::query!(
"
SELECT todos.id, value FROM todos
INNER JOIN users ON todos.user_id = users.id
WHERE users.user = ?
WHERE user_id = ?
",
ctx.author().id.get(),
)