Database: Add diesel_cli config.

This commit is contained in:
Jordan Petridis 2018-06-30 21:36:36 +03:00
parent f3fb27005a
commit 5b8b265371
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6
3 changed files with 37 additions and 0 deletions

6
hammond-data/diesel.toml Normal file
View File

@ -0,0 +1,6 @@
# For documentation on how to configure this file,
# see diesel.rs/guides/configuring-diesel-cli
[print_schema]
file = "src/schema.rs"
patch_file = "src/schema.patch"

View File

@ -0,0 +1,29 @@
diff --git a/hammond-data/src/schema.rs b/hammond-data/src/schema.rs
index 03cbed0..88f1622 100644
--- a/hammond-data/src/schema.rs
+++ b/hammond-data/src/schema.rs
@@ -1,8 +1,11 @@
+#![allow(warnings)]
+
table! {
episodes (title, show_id) {
+ rowid -> Integer,
title -> Text,
uri -> Nullable<Text>,
local_uri -> Nullable<Text>,
description -> Nullable<Text>,
epoch -> Integer,
length -> Nullable<Integer>,
@@ -30,11 +33,7 @@ table! {
uri -> Text,
last_modified -> Nullable<Text>,
http_etag -> Nullable<Text>,
}
}
-allow_tables_to_appear_in_same_query!(
- episodes,
- shows,
- source,
-);
+allow_tables_to_appear_in_same_query!(episodes, shows, source);

View File

@ -1,3 +1,5 @@
#![allow(warnings)]
table! { table! {
episodes (title, show_id) { episodes (title, show_id) {
rowid -> Integer, rowid -> Integer,