mirror of
https://github.com/launchbadge/sqlx
synced 2024-09-20 14:21:57 +00:00
10 lines
328 B
SQL
10 lines
328 B
SQL
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);
|