ProjectLighthouse/DatabaseMigrations/3.sql
2021-10-07 00:59:55 -04:00

21 lines
520 B
SQL

create table Comments
(
CommentId int,
PosterUserId int not null,
TargetUserId int not null,
Timestamp bigint not null,
ThumbsUp int default 0 not null,
ThumbsDown int default 0 not null,
Message longtext not null
);
create unique index Comments_CommentId_uindex
on Comments (CommentId);
alter table Comments
add constraint Comments_pk
primary key (CommentId);
alter table Comments
modify CommentId int auto_increment;