rust code to go along with lack of optional fields

This commit is contained in:
shockrah 2020-03-08 19:49:36 -07:00
parent 50c2c1da0e
commit d7c70afd68
2 changed files with 4 additions and 4 deletions

View File

@ -7,11 +7,11 @@ pub struct Invite {
pub uses: Option<i32>,
}
#[derive(Serialize, Deserialize, Queryable, Debug]
#[derive(Serialize, Deserialize, Queryable, Insertable, Debug)]
#[table_name = "users"]
pub struct User {
userid: u64,
username: String,
key_hash: Option<String>,
key: String,
date: u64,
}

View File

@ -16,8 +16,8 @@ table! {
table! {
users (userid) {
userid -> Unsigned<Bigint>,
username -> Nullable<Varchar>,
key_hash -> Nullable<Varchar>,
username -> Varchar,
key -> Varchar,
date -> Unsigned<Bigint>,
}
}