aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2019-03-04 16:27:01 +0100
committerHarald Eilertsen <haraldei@anduin.net>2019-03-04 16:27:01 +0100
commite0b02ee68d2b66a9c2fbb58173c74d97fa455b46 (patch)
treec4d6580ca835b924b69fe241fdf08bc0aa489c41 /src
parentc66b8d799c725a6e66c5f59f66b3c6ae3dd3e8f5 (diff)
downloadramaskrik-social-e0b02ee68d2b66a9c2fbb58173c74d97fa455b46.tar.gz
ramaskrik-social-e0b02ee68d2b66a9c2fbb58173c74d97fa455b46.tar.bz2
ramaskrik-social-e0b02ee68d2b66a9c2fbb58173c74d97fa455b46.zip
Add basic db schema.
Diffstat (limited to 'src')
-rw-r--r--src/schema.rs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/schema.rs b/src/schema.rs
new file mode 100644
index 0000000..88e1e00
--- /dev/null
+++ b/src/schema.rs
@@ -0,0 +1,31 @@
+table! {
+ films (id) {
+ id -> Int4,
+ title -> Varchar,
+ url -> Nullable<Varchar>,
+ }
+}
+
+table! {
+ rooms (id) {
+ id -> Int4,
+ name -> Varchar,
+ }
+}
+
+table! {
+ screenings (id) {
+ id -> Int4,
+ film_id -> Int4,
+ room_id -> Int4,
+ date -> Date,
+ start_time -> Time,
+ end_time -> Time,
+ }
+}
+
+allow_tables_to_appear_in_same_query!(
+ films,
+ rooms,
+ screenings,
+);