fix: make all reservation fields required
This commit is contained in:
parent
dda5fd5a93
commit
9ac297cf5a
@ -0,0 +1,4 @@
|
||||
ALTER TABLE reservations
|
||||
ALTER COLUMN user_id DROP NOT NULL,
|
||||
ALTER COLUMN entered_name DROP NOT NULL,
|
||||
ALTER COLUMN event_id DROP NOT NULL;
|
||||
@ -0,0 +1,4 @@
|
||||
ALTER TABLE reservations
|
||||
ALTER COLUMN user_id SET NOT NULL,
|
||||
ALTER COLUMN entered_name SET NOT NULL,
|
||||
ALTER COLUMN event_id SET NOT NULL;
|
||||
@ -34,7 +34,7 @@ pub struct Message {
|
||||
#[diesel(table_name = reservations)]
|
||||
pub struct Reservation {
|
||||
pub id: i32,
|
||||
pub user_id: Option<i32>,
|
||||
pub user_id: Option<i64>,
|
||||
pub entered_name: Option<String>,
|
||||
pub booked_time: NaiveDateTime,
|
||||
pub event_id: Option<i32>,
|
||||
|
||||
@ -29,11 +29,11 @@ diesel::table! {
|
||||
diesel::table! {
|
||||
reservations (id) {
|
||||
id -> Int4,
|
||||
user_id -> Nullable<Int4>,
|
||||
user_id -> Int8,
|
||||
#[max_length = 255]
|
||||
entered_name -> Nullable<Varchar>,
|
||||
entered_name -> Varchar,
|
||||
booked_time -> Timestamp,
|
||||
event_id -> Nullable<Int4>,
|
||||
event_id -> Int4,
|
||||
status -> Varchar,
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user