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` (
|
CREATE TABLE IF NOT EXISTS `invites` (
|
||||||
`id` bigint UNSIGNED NOT NULL,
|
`id` bigint UNSIGNED NOT NULL,
|
||||||
`expires` bigint UNSIGNED NOT NULL,
|
`expires` bigint UNSIGNED NOT NULL,
|
||||||
`uses` integer,
|
`uses` integer NOT NULL,
|
||||||
PRIMARY KEY( `id` )
|
PRIMARY KEY( `id` )
|
||||||
);
|
);
|
||||||
|
@ -4,7 +4,7 @@ use crate::schema::{invites, users};
|
|||||||
pub struct Invite {
|
pub struct Invite {
|
||||||
pub id: u64,
|
pub id: u64,
|
||||||
pub expires: u64,
|
pub expires: u64,
|
||||||
pub uses: Option<i32>,
|
pub uses: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Queryable, Insertable, Debug)]
|
#[derive(Serialize, Deserialize, Queryable, Insertable, Debug)]
|
||||||
|
@ -2,14 +2,7 @@ table! {
|
|||||||
invites (id) {
|
invites (id) {
|
||||||
id -> Unsigned<Bigint>,
|
id -> Unsigned<Bigint>,
|
||||||
expires -> Unsigned<Bigint>,
|
expires -> Unsigned<Bigint>,
|
||||||
uses -> Nullable<Integer>,
|
uses -> Integer,
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
table! {
|
|
||||||
new_users (token) {
|
|
||||||
token -> Varchar,
|
|
||||||
invite_id -> Unsigned<Bigint>,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,6 +17,5 @@ table! {
|
|||||||
|
|
||||||
allow_tables_to_appear_in_same_query!(
|
allow_tables_to_appear_in_same_query!(
|
||||||
invites,
|
invites,
|
||||||
new_users,
|
|
||||||
users,
|
users,
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user