aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2018-01-18 20:09:37 +0100
committerHarald Eilertsen <haraldei@anduin.net>2018-01-18 20:09:37 +0100
commite96c58580b2ac1874718f3d31a1d4abcdcc6dbb6 (patch)
tree0664622fae114651934c12daeeb41404cf9f8672
parentbf2e515855ffa04c8884a14c872001dd378d673e (diff)
downloadrocket-blog-e96c58580b2ac1874718f3d31a1d4abcdcc6dbb6.tar.gz
rocket-blog-e96c58580b2ac1874718f3d31a1d4abcdcc6dbb6.tar.bz2
rocket-blog-e96c58580b2ac1874718f3d31a1d4abcdcc6dbb6.zip
Be explicit about the schema instead of infering it.
We don't want to depend on having a correctly set up database just to be able to build the program.
-rw-r--r--src/schema.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/schema.rs b/src/schema.rs
index 236bbc9..3124ea5 100644
--- a/src/schema.rs
+++ b/src/schema.rs
@@ -1 +1,8 @@
-infer_schema!("dotenv:DATABASE_URL");
+table! {
+ posts (id) {
+ id -> Int4,
+ title -> Varchar,
+ body -> Text,
+ published -> Bool,
+ }
+}