升级mysql工作台后无法更改表?

时间:2018-08-31 08:58:50

标签: mysql sql mysql-workbench

在安装新的更新版本之前,可以使用MySql工作台很好。

我正在尝试运行以下查询:

CREATE TABLE IF NOT EXISTS `authTokens_admin` (
      `id` VARCHAR(20) NOT NULL,
      `adminid` VARCHAR(20) NULL DEFAULT NULL,
      `token` VARCHAR(20) NULL DEFAULT NULL,
      `active` VARCHAR(1) NULL DEFAULT '0',
      PRIMARY KEY (`id`),
      INDEX `auth_2_admin_idx` (`adminid` ASC) VISIBLE,
      CONSTRAINT `auth_2_admin`
        FOREIGN KEY (`adminid`)
        REFERENCES `admindetails` (`adminid`)
        ON DELETE NO ACTION
        ON UPDATE NO ACTION)
    ENGINE = InnoDB
    DEFAULT CHARACTER SET = utf8

哪个会引发此错误?

    Executing SQL script in server
ERROR: Error 1064: 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 'VISIBLE,
  CONSTRAINT `auth_2_admin`
    FOREIGN KEY (`adminid`)
    REFERENCES ' at line 7

请帮助我!

0 个答案:

没有答案