เกิด Error Error 1064: You have an error in your SQL syntax

wave
PNum Pairat
4,466
สังคมนักพัฒนาระบบ (Community)
เกิด Error Error 1064: You have an error in your SQL syntax

Executing SQL script in server
ERROR: Error 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 '
  UNIQUE INDEX `user_unique_email` (`email` ASC) VISIBLE)
ENGINE = InnoDB
AUTO_' at line 19
SQL Code:
        -- -----------------------------------------------------
        -- Table `yii2basic`.`user`
        -- -----------------------------------------------------
        CREATE TABLE IF NOT EXISTS `yii2basic`.`user` (
          `id` INT(11) NOT NULL AUTO_INCREMENT,
          `username` VARCHAR(255) NOT NULL,
          `email` VARCHAR(255) NOT NULL,
          `password_hash` VARCHAR(60) NOT NULL,
          `auth_key` VARCHAR(32) NOT NULL,
          `confirmed_at` INT(11) NULL DEFAULT NULL,
          `unconfirmed_email` VARCHAR(255) NULL DEFAULT NULL,
          `blocked_at` INT(11) NULL DEFAULT NULL,
          `registration_ip` VARCHAR(45) NULL DEFAULT NULL,
          `created_at` INT(11) NOT NULL,
          `updated_at` INT(11) NOT NULL,
          `flags` INT(11) NOT NULL DEFAULT '0',
          `last_login_at` INT(11) NULL DEFAULT NULL,
          PRIMARY KEY (`id`),
          UNIQUE INDEX `user_unique_username` (`username` ASC) VISIBLE,
          UNIQUE INDEX `user_unique_email` (`email` ASC) VISIBLE)
        ENGINE = InnoDB
        AUTO_INCREMENT = 3
        DEFAULT CHARACTER SET = utf8
        COLLATE = utf8_unicode_ci
        COMMENT = 'user login\n'

SQL script execution finished: statements: 6 succeeded, 1 failed

1 ความคิดเห็น

  • มานพ กองอุ่น

เอา VISIBLE ออกครับ