Skip to content
Snippets Groups Projects
Commit ad32dacc authored by YuJin's avatar YuJin
Browse files

fix: update Comment table to replace DEFAULT CURRENT_DATE with DEFAULT...

parent 743a8bd6
No related branches found
No related tags found
1 merge request!44fix: update Comment table to replace DEFAULT CURRENT_DATE with DEFAULT...
......@@ -121,17 +121,18 @@ CREATE TABLE `Post`
DROP TABLE IF EXISTS `Comment`;
CREATE TABLE `Comment`
(
`commentID` INT NOT NULL,
`commentID` INT NOT NULL AUTO_INCREMENT,
`userID` INT NOT NULL,
`postID` INT NOT NULL,
`content` TEXT NULL,
`commentDate` DATE NULL DEFAULT CURRENT_DATE,
`commentDate` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`commentID`),
FOREIGN KEY (`userID`) REFERENCES `User` (`userID`),
FOREIGN KEY (`postID`) REFERENCES `Post` (`postID`),
INDEX `idx_comment_date` (`commentDate`)
);
-- UserCrew 테이블
DROP TABLE IF EXISTS `UserCrew`;
CREATE TABLE `UserCrew`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment