refactor(db): Establish Post->Thread association
This makes it possible to query posts by thread via Diesel.
This commit is contained in:
parent
6e56f8e729
commit
316036b0a8
5 changed files with 15 additions and 7 deletions
1
migrations/2018-04-08-161017_joinable_posts/down.sql
Normal file
1
migrations/2018-04-08-161017_joinable_posts/down.sql
Normal file
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE posts RENAME COLUMN thread_id TO thread;
|
||||
1
migrations/2018-04-08-161017_joinable_posts/up.sql
Normal file
1
migrations/2018-04-08-161017_joinable_posts/up.sql
Normal file
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE posts RENAME COLUMN thread TO thread_id;
|
||||
Loading…
Add table
Add a link
Reference in a new issue