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 (10 lines) | stat: -rw-r--r-- 328 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
create table comment
(
    comment_id integer primary key,
    post_id    integer not null references post (post_id),
    user_id    integer not null references "user" (user_id),
    content    text    not null,
    created_at datetime default (datetime('now'))
);

create index comment_created_at on comment (created_at desc);