Major restructure
This commit is contained in:
parent
5b8d1cbdb1
commit
27386d5d18
9 changed files with 87 additions and 110 deletions
|
@ -2,6 +2,8 @@ CREATE TABLE IF NOT EXISTS posts (
|
|||
id SERIAL PRIMARY KEY,
|
||||
user_id SERIAL NOT NULL,
|
||||
content TEXT NOT NULL,
|
||||
upvotes INT NOT NULL DEFAULT 0,
|
||||
downvotes INT NOT NULL DEFAULT 0,
|
||||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (user_id) REFERENCES users (id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue