No more nullable uses field(it was signed) so option was redundant

This commit is contained in:
shockrah 2020-03-09 00:52:09 -07:00
parent 2eb2a83c76
commit 924c15a436
3 changed files with 3 additions and 11 deletions

View File

@ -2,6 +2,6 @@
CREATE TABLE IF NOT EXISTS `invites` (
`id` bigint UNSIGNED NOT NULL,
`expires` bigint UNSIGNED NOT NULL,
`uses` integer,
`uses` integer NOT NULL,
PRIMARY KEY( `id` )
);

View File

@ -4,7 +4,7 @@ use crate::schema::{invites, users};
pub struct Invite {
pub id: u64,
pub expires: u64,
pub uses: Option<i32>,
pub uses: i32,
}
#[derive(Serialize, Deserialize, Queryable, Insertable, Debug)]

View File

@ -2,14 +2,7 @@ table! {
invites (id) {
id -> Unsigned<Bigint>,
expires -> Unsigned<Bigint>,
uses -> Nullable<Integer>,
}
}
table! {
new_users (token) {
token -> Varchar,
invite_id -> Unsigned<Bigint>,
uses -> Integer,
}
}
@ -24,6 +17,5 @@ table! {
allow_tables_to_appear_in_same_query!(
invites,
new_users,
users,
);