You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CreateDateColumn and UpdateDateColumn are not working in MySQL. The syntax when the tabela is creating is not correct. Therefore, MySQL throws exception.
The text was updated successfully, but these errors were encountered:
can you show me error you have and code you are running? Also mysql version. There are tests which completely cover this functionality and it cannot be broken.
CREATE TABLE chat_messages (id int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, type varchar(255) NOT NULL, message text NOT NULL, created_at datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), updated_at datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), senderId int(11), chatId int(11)) ENGINE=InnoDB
the error it generated was
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): QueryFailedError: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), `updated_at` datetime(6) NOT NULL DEF' at line 1
CreateDateColumn and UpdateDateColumn are not working in MySQL. The syntax when the tabela is creating is not correct. Therefore, MySQL throws exception.
The text was updated successfully, but these errors were encountered: