fix(postgres): use INT instead of BIGINT for simple counts

This commit is contained in:
trisua 2025-04-03 15:56:44 -04:00
parent 27d7c2f4b5
commit 9f4e8a4d25
13 changed files with 55 additions and 56 deletions

View file

@ -21,7 +21,7 @@ impl DataManager {
title: get!(x->2(String)),
content: get!(x->3(String)),
owner: get!(x->4(i64)) as usize,
read: if get!(x->5(i64)) as i8 == 1 {
read: if get!(x->5(i32)) as i8 == 1 {
true
} else {
false
@ -71,7 +71,7 @@ impl DataManager {
&data.title,
&data.content,
&(data.owner as i64),
&(if data.read { 1 } else { 0 } as i64)
&(if data.read { 1 } else { 0 } as i32)
]
);
@ -162,7 +162,7 @@ impl DataManager {
let res = execute!(
&conn,
"UPDATE notifications SET read = $1 WHERE id = $2",
params![&(if new_read { 1 } else { 0 } as i64), &(id as i64)]
params![&(if new_read { 1 } else { 0 } as i32), &(id as i64)]
);
if let Err(e) = res {