Support for comments
This commit is contained in:
7
migrations/20251001165158_create_comments_table.sql
Normal file
7
migrations/20251001165158_create_comments_table.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
CREATE TABLE comments (
|
||||
comment_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
post_id UUID NOT NULL REFERENCES posts (post_id) ON DELETE CASCADE,
|
||||
author TEXT,
|
||||
content TEXT NOT NULL,
|
||||
published_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
);
|
||||
Reference in New Issue
Block a user