Bom dia galera, estou seguindo o curso mas escrevendo tudo em inglês. Acontece que to com um errinho chato que não consigo achar solução.
SQL State : 42001
Error Code : 42001
Message : Syntax error in SQL statement "CREATE TABLE QUESTION(
ID BIGINT NOT NULL AUTO_INCREMENT,
TITLE VARCHAR(255) NOT NULL,
MESSAGE TINYTEXT NOT NULL,
CREATED_AT DATETIME NOT NULL,
STATUS VARCHAR(50) NOT NULL,
COURSE_ID BIGINT NOT NULL,
AUTHOR_ID BIGINT NOT NULL,
PRIMARY KEY(ID),
FOREIGN KEY(COURSE_ID) REFERENCES COURSE(ID),
FOREIGN KEY(AUTHOR_ID) REFERENCES USER(ID),
)[*]"; expected "identifier"; SQL statement:
CREATE TABLE question(
id BIGINT NOT NULL AUTO_INCREMENT,
title VARCHAR(255) NOT NULL,
message TINYTEXT NOT NULL,
created_at DATETIME NOT NULL,
status VARCHAR(50) NOT NULL,
course_id BIGINT NOT NULL,
author_id BIGINT NOT NULL,
PRIMARY KEY(id),
FOREIGN KEY(course_id) REFERENCES course(id),
FOREIGN KEY(author_id) REFERENCES user(id),
) [42001-200]
Location : db/migration/V3__create_question_table.sql (/Users/brunosantos/Documents/forum/target/classes/db/migration/V3__create_question_table.sql)
Line : 1
Statement : CREATE TABLE question(
id BIGINT NOT NULL AUTO_INCREMENT,
title VARCHAR(255) NOT NULL,
message TINYTEXT NOT NULL,
created_at DATETIME NOT NULL,
status VARCHAR(50) NOT NULL,
course_id BIGINT NOT NULL,
author_id BIGINT NOT NULL,
PRIMARY KEY(id),
FOREIGN KEY(course_id) REFERENCES course(id),
FOREIGN KEY(author_id) REFERENCES user(id),
)
Se alguem conseguir me ajudar fico mto agradecido, meio q travei no curso por conta do erro :P