10.1.28-MariaDB
I'm trying to make a new table in the voyager admin panel but i keep getting the error:
generic.exception: An exception occurred while executing 'CREATE TABLE newReport (id INT UNSIGNED AUTO_INCREMENT NOT NULL, owner_id INT DEFAULT NULL, title VARCHAR(166) DEFAULT NULL, description text DEFAULT NULL, report json DEFAULT NULL, created_at timestamp null DEFAULT NULL, updated_at timestamp null DEFAULT NULL, deleted_at timestamp null DEFAULT NULL, INDEX newreport_owner_id_index (owner_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB': SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json DEFAULT NULL, created_at timestamp null DEFAULT NULL, updated_at timestamp ' at line 1
or some variant of a SQL syntax error depending on what I'm trying.
I'm using Xampp and haven't installed a MariaDB server do i need to use a MariaDB server? or is my problem something else?
if i remove the json data type the error becomes:
generic.exception: An exception occurred while executing 'CREATE TABLE newReport (id INT UNSIGNED AUTO_INCREMENT NOT NULL, owner_id INT DEFAULT NULL, title VARCHAR(166) NOT NULL, description text NOT NULL, report text NOT NULL, created_at timestamp DEFAULT 'CURRENT_DATE', updated_at timestamp null DEFAULT NULL, deleted_at timestamp null DEFAULT NULL, INDEX newreport_owner_id_index (owner_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB': SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created_at'
Create Table
statement? It's hard to see. – SS_DBA