2018-04-08 15:49:19 +02:00
|
|
|
table! {
|
|
|
|
posts (id) {
|
|
|
|
id -> Int4,
|
2018-04-08 18:27:15 +02:00
|
|
|
thread_id -> Int4,
|
2018-04-08 15:49:19 +02:00
|
|
|
body -> Text,
|
|
|
|
posted -> Timestamptz,
|
2018-04-08 22:37:21 +02:00
|
|
|
author_name -> Varchar,
|
|
|
|
author_email -> Varchar,
|
2018-04-08 15:49:19 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
table! {
|
|
|
|
threads (id) {
|
|
|
|
id -> Int4,
|
|
|
|
title -> Varchar,
|
|
|
|
posted -> Timestamptz,
|
2018-04-08 22:37:21 +02:00
|
|
|
author_name -> Varchar,
|
|
|
|
author_email -> Varchar,
|
2018-04-08 15:49:19 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-08 18:27:15 +02:00
|
|
|
joinable!(posts -> threads (thread_id));
|
2018-04-08 15:49:19 +02:00
|
|
|
|
|
|
|
allow_tables_to_appear_in_same_query!(
|
|
|
|
posts,
|
|
|
|
threads,
|
|
|
|
);
|