diff --git a/migrations/2023-11-04-093417_create_shows/up.sql b/migrations/2023-11-04-093417_create_shows/up.sql index 63dee6c..1f14672 100644 --- a/migrations/2023-11-04-093417_create_shows/up.sql +++ b/migrations/2023-11-04-093417_create_shows/up.sql @@ -4,6 +4,7 @@ CREATE TABLE id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, dancer INT UNSIGNED NOT NULL, start DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, + estimated_end DATETIME NOT NULL, end DATETIME DEFAULT NULL, FOREIGN KEY (dancer) REFERENCES dancers (id) ON DELETE RESTRICT ) diff --git a/src/lib/models.rs b/src/lib/models.rs index f306326..54dcc61 100644 --- a/src/lib/models.rs +++ b/src/lib/models.rs @@ -56,5 +56,6 @@ pub struct Show { pub id: u32, pub dancer: u32, pub start: chrono::NaiveDateTime, + pub estimated_end: chrono::NaiveDateTime, pub end: Option, } diff --git a/src/lib/schema.rs b/src/lib/schema.rs index fd547f1..68ec100 100644 --- a/src/lib/schema.rs +++ b/src/lib/schema.rs @@ -31,6 +31,7 @@ diesel::table! { id -> Unsigned, dancer -> Unsigned, start -> Datetime, + estimated_end -> Datetime, end -> Nullable, } }