Debian Codegraph @

tests/sqlite/migrations/3_comment.sql

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