Add a follow model
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
-- This file should undo anything in `up.sql`
|
||||
DROP TABLE follows;
|
||||
@@ -0,0 +1,6 @@
|
||||
-- Your SQL goes here
|
||||
CREATE TABLE follows (
|
||||
id SERIAL PRIMARY KEY,
|
||||
follower_id INTEGER REFERENCES users(id) ON DELETE CASCADE NOT NULL,
|
||||
following_id INTEGER REFERENCES users(id) ON DELETE CASCADE NOT NULL
|
||||
)
|
||||
Reference in New Issue
Block a user