Skip to content

Commit 78670ae

Browse files
committed
feat: history pushes, redirects & minor refactors/fixes
1 parent d40f402 commit 78670ae

File tree

11 files changed

+740
-716
lines changed

11 files changed

+740
-716
lines changed

server/src/entity/reactions.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use diesel::{allow_tables_to_appear_in_same_query, Identifiable, Insertable, Queryable, Selectable};
22
use crate::entity::message::messages;
33
use crate::entity::user::users;
4-
use diesel::sql_types::{BigInt, Text, Varchar, Integer, Bool};
4+
use diesel::sql_types::{BigInt, Text, Varchar, Integer, Bool, Serial};
55
use diesel::prelude::*;
66
use serde::{Deserialize, Serialize};
77

@@ -18,7 +18,7 @@ pub struct Reaction {
1818

1919
diesel::table! {
2020
reactions (reaction_id) {
21-
reaction_id -> Integer,
21+
reaction_id -> Serial,
2222
message_id -> BigInt,
2323
emoji -> Varchar,
2424
reaction_count -> Integer
@@ -39,7 +39,7 @@ pub struct ReactionUser {
3939

4040
diesel::table! {
4141
reaction_users (id) {
42-
id -> Integer,
42+
id -> Serial,
4343
reaction_id -> Integer,
4444
user_id -> BigInt
4545
}
@@ -77,7 +77,7 @@ pub struct ReactionSummary {
7777
pub count: i32,
7878
#[sql_type = "Bool"]
7979
pub me: bool,
80-
#[sql_type = "Integer"]
80+
#[sql_type = "Serial"]
8181
pub reaction_id: i32
8282
}
8383

server/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ async fn main() {
6060
tracing_subscriber::registry()
6161
.with(
6262
tracing_subscriber::EnvFilter::try_from_default_env()
63-
.unwrap_or_else(|_| "example_websockets=debug,tower_http=info,diesel=debug".into()),
63+
.unwrap_or_else(|_| "example_websockets=debug,tower_http=debug ,diesel=debug".into()),
6464
)
6565
.with(tracing_subscriber::fmt::layer())
6666
.init();

0 commit comments

Comments
 (0)