druid MysqlCreateTable 索引定义省略 INDEX 或者 KEY 关键字 解析有点问题

w7t8yxp5  于 5个月前  发布在  Druid
关注(0)|答案(1)|浏览(111)

CREATE TABLE opening_lines ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, opening_line TEXT(500), author VARCHAR(200), title VARCHAR(200), FULLTEXT idx (opening_line) ) ENGINE=InnoDB;

省略 INDEX 或者 KEY关键字, FULLTEXT会被当成字段

opening_line TEXT(500): class com.alibaba.druid.sql.ast.statement.SQLColumnDefinition
author VARCHAR(200): class com.alibaba.druid.sql.ast.statement.SQLColumnDefinition
title VARCHAR(200): class com.alibaba.druid.sql.ast.statement.SQLColumnDefinition
fulltext idx(opening_line): class com.alibaba.druid.sql.ast.statement.SQLColumnDefinition

dtcbnfnu

dtcbnfnu1#

另外, 接上面的 SQL.

id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY

似乎不能正确识别这样的主键定义

相关问题