File: 3_comment.sql

package info (click to toggle)
rust-sqlx 0.8.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,744 kB
  • sloc: sql: 335; python: 268; sh: 71; makefile: 2
file content (9 lines) | stat: -rw-r--r-- 314 bytes parent folder | download
1
2
3
4
5
6
7
8
9
create table comment (
    comment_id uuid primary key default uuid_generate_v1mc(),
    post_id uuid not null references post(post_id),
    user_id uuid not null references "user"(user_id),
    content text not null,
    created_at timestamptz not null default now()
);

create index on comment(created_at desc);