about summary refs log tree commit diff
path: root/src/models.rs
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-04-14T14·33+0200
committerVincent Ambo <tazjin@gmail.com>2018-04-14T14·33+0200
commit8c30ef92f652f411679408344031706745346f02 (patch)
treef15ab0ebead519c105c03c128ae7f04c4194074b /src/models.rs
parenta90d1cc1a41e405ea397b06a3bc1907291c98b65 (diff)
refactor(db): Store thread body in the posts table
This is a simplification over the previous approach. The OP of a
thread is just a normal post like any other in this model, which
allows some code simplifications (and future query convenience).
Diffstat (limited to 'src/models.rs')
-rw-r--r--src/models.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/models.rs b/src/models.rs
index 388dab48534d..eb3030ccb310 100644
--- a/src/models.rs
+++ b/src/models.rs
@@ -5,7 +5,6 @@ use schema::{threads, posts};
 pub struct Thread {
     pub id: i32,
     pub title: String,
-    pub body: String,
     pub posted: DateTime<Utc>,
     pub author_name: String,
     pub author_email: String,
@@ -26,7 +25,6 @@ pub struct Post {
 #[table_name="threads"]
 pub struct NewThread {
     pub title: String,
-    pub body: String,
     pub author_name: String,
     pub author_email: String,
 }