10.1.28 - MariaDB보이저 데이터베이스 및 MariaDB 서버
내가 보이저 관리자 패널에서 새 테이블을 만들려고하지만 난이 오류가 계속 :
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
또는 일부 변형을 내가 시도하는 것에 따라 SQL 구문 오류이 발생합니다.
나는 XAMPP을 사용하고 있는데 내가이 MariaDB 서버를 사용해야 않는 MariaDB 서버를 설치하지 않은? 아니면 내 문제가 뭔가?
제가 오류된다 JSON 데이터 유형 제거하면 다음 JSON
MySQL의 데이터 형식이 5.7에서 도입 된
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'
중복 가능성이 있습니다. 이것이 도움이되는지 확인하십시오. https://stackoverflow.com/questions/42425667/mariadb-json-support-in-laravel?rq=1 –
내가 json coulomb을 제거하면 나는 여전히 "json DEFAULT NULL"부분을 사용하지 않는다. 내 문제가 특별히 json 데이터 유형과 관련 있다고 생각하지 마십시오 – crffty
'Create Table' 문을 게시 할 수 있습니까? 볼 수 없어요. –