When attempting to run this query in Node.JS/Express using MySQL, I get an error.
Without the line "created DATETIME,\n" the code works perfectly. When including that line, or any variation of it (such as trying to attempt to put a default date of the current time), it also says the exact same error.
"You have an error in your SQL syntax; check the ... (redacted) ... for the right syntax to use near '' at line 4"
var create_elements =
"CREATE TABLE elements(\n" +
"id INT NOT NULL AUTO_INCREMENT,\n" +
"googleID VARCHAR(60),\n" +
"created DATETIME,\n"
"title VARCHAR(300),\n" +
"body TEXT,\n" +
"type ENUM('blog', 'issue'),\n" +
"PRIMARY KEY (id)\n" +
");";
+after"created DATETIME,\n", is that a typo?