Debian Codegraph @

tests/postgres/migrations/3_comment.sql

raw
1 create table comment (
2 comment_id uuid primary key default uuid_generate_v1mc(),
3 post_id uuid not null references post(post_id),
4 user_id uuid not null references "user"(user_id),
5 content text not null,
6 created_at timestamptz not null default now()
7 );
8
9 create index on comment(created_at desc);