feat(db): Add migration & fields to indicate a thread is closed

This commit is contained in:
Vincent Ambo 2018-05-25 18:11:46 +02:00 committed by Vincent Ambo
parent 33462c01fa
commit 468af132e8
4 changed files with 4 additions and 0 deletions

View file

@ -0,0 +1 @@
ALTER TABLE threads DROP COLUMN closed;

View file

@ -0,0 +1 @@
ALTER TABLE threads ADD COLUMN closed BOOLEAN NOT NULL DEFAULT false;

View file

@ -39,6 +39,7 @@ pub struct Thread {
pub posted: DateTime<Utc>,
pub sticky: bool,
pub user_id: i32,
pub closed: bool,
}
#[derive(Identifiable, Queryable, Serialize, Associations)]

View file

@ -33,6 +33,7 @@ table! {
posted -> Timestamptz,
sticky -> Bool,
user_id -> Int4,
closed -> Bool,
}
}