about summary refs log tree commit diff
path: root/src/schema.rs
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-04-08T16·27+0200
committerVincent Ambo <tazjin@gmail.com>2018-04-08T16·30+0200
commit316036b0a89a428e850ea33e07f5fe2362f833c9 (patch)
tree489a4e6c8b7e8f117b054d0087981027f288aad3 /src/schema.rs
parent6e56f8e729551ff14b7a72ca889b8dd38999fb2d (diff)
refactor(db): Establish Post->Thread association
This makes it possible to query posts by thread via Diesel.
Diffstat (limited to 'src/schema.rs')
-rw-r--r--src/schema.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/schema.rs b/src/schema.rs
index a899f52ac2cc..8b05eb5461c3 100644
--- a/src/schema.rs
+++ b/src/schema.rs
@@ -1,7 +1,7 @@
 table! {
     posts (id) {
         id -> Int4,
-        thread -> Int4,
+        thread_id -> Int4,
         body -> Text,
         posted -> Timestamptz,
     }
@@ -16,7 +16,7 @@ table! {
     }
 }
 
-joinable!(posts -> threads (thread));
+joinable!(posts -> threads (thread_id));
 
 allow_tables_to_appear_in_same_query!(
     posts,