No more nullable uses field(it was signed) so option was redundant
This commit is contained in:
parent
2eb2a83c76
commit
924c15a436
@ -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` )
|
||||
);
|
||||
|
@ -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)]
|
||||
|
@ -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,
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user