diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2018-01-18 20:09:37 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2018-01-18 20:09:37 +0100 |
commit | e96c58580b2ac1874718f3d31a1d4abcdcc6dbb6 (patch) | |
tree | 0664622fae114651934c12daeeb41404cf9f8672 /src | |
parent | bf2e515855ffa04c8884a14c872001dd378d673e (diff) | |
download | rocket-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.
Diffstat (limited to 'src')
-rw-r--r-- | src/schema.rs | 9 |
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, + } +} |