Erro mysql workbench – Stack Overflow in Português

Select another method to create a project, click on a template, select a template and press the corresponding button, then select a template, and click the corresponding button, then click the corresponding button, then click the following link for display the model. learn more, click here to learn more about search solutions.

Erro:

Running the SQL script on the server ERROR: Error 1064: You have an error in
your SQL syntax check the manual corresponding to your MySQL
server version for the correct syntax to use near VISIBLE, CONSTRAINT
fk_users_bookRegistration1
FOREIGN KEY (bookRegistr & # 39; at line 11 SQL Code:
CREATE TABLE IF NOT EXISTED
libraryRat.users(
user IDINT (11) NOT NULL AUTO_INCREMENT,
first nameVARCHAR (45) NULL DEFAULT NULL,
E-mailVARCHAR (45) NULL DEFAULT NULL,
passwordVARCHAR (80) NULL DEFAULT NULL,
birth dateDATE NULL DEFAULT NULL,
livresReadenVARCHAR (45) NULL DEFAULT NULL,
wish listVARCHAR (45) NULL DEFAULT NULL,
bookRegistration_userIDINT (11) NOT NULL,
PRIMARY KEY (
user ID)
INDEX
fk_users_bookRegistration1_idx(bookRegistration_userIDASC) VISIBLE,
CONSTRAINT
fk_users_bookRegistration1
FOREIGN KEY (
bookRegistration_userID)
REFERENCES
libraryRat.bookRegistration(User ID`)
REMOVE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8

Execution of the completed SQL script: instructions: 3 successful, 1 failed

Retrieving view definitions in their final form. Nothing to look for

Code mysql:

            - MySQL Workbench Synchronization
- Generated: 2018-12-31 01:55
- Model: New model
- Version: 1.0
- Project: Project name
- Author: nelson

SET @OLD_UNIQUE_CHECKS = @@ UNIQUE_CHECKS, UNIQUE_CHECKS = 0;
SET @OLD_FOREIGN_KEY_CHECKS = @@ FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS = 0;
SET @OLD_SQL_MODE = @@ SQL_MODE, SQL_MODE = & # 39; ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_ENGINE_SUBSTITUTION & # 39 ;;

CREATE TABLE IF NOT EXISTED `libraryRat`.`users` (
`userID` INT (11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR (45) NULL DEFAULT NULL,
`email` VARCHAR (45) NULL DEFAULT NULL,
`password` VARCHAR (80) NULL DEFAULT NULL,
`birthdate` DATE NULL DEFAULT NULL,
`booksReaden` VARCHAR (45) NULL DEFAULT NULL,
`wishList` VARCHAR (45) NULL DEFAULT NULL,
`bookRegistration_userID` INT (11) NOT NULL,
PRIMARY KEY (`userID`),
INDEX `fk_users_bookRegistration_idx` (` bookRegistration_userID` ASC) VISIBLE,
CONSTRAINT `fk_users_bookRegistration`
FOREIGN KEY (`bookRegistration_userID`)
REFERENCES `libraryRat`.`bookRegistration` (` userID`)
REMOVE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

CREATE TABLE IF NOT EXISTED `libraryRat`.`books` (
`bookID` INT (11) NOT NULL,
`name` VARCHAR (80) NULL DEFAULT NULL,
`description` VARCHAR (200) NULL DEFAULT NULL,
`isbn` INT (11) NULL DEFAULT NULL,
`cover` VARCHAR (150) NULL DEFAULT NULL,
`rating` DECIMAL (50) NULL DEFAULT NULL,
`kinds` VARCHAR (45) NULL DEFAULT NULL,
PRIMARY KEY (`bookID`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

CREATE TABLE IF NOT EXISTED `libraryRat`.`author` (
`authorID` INT (11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR (45) NULL DEFAULT NULL,
`birthdate` DATE NULL DEFAULT NULL,
`about` VARCHAR (500) NULL DEFAULT NULL,
PRIMARY KEY (`authorID`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

CREATE TABLE IF NOT EXISTED `libraryRat`.`admin` (
`idAdmin` INT (11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR (45) NULL DEFAULT NULL,
`password` VARCHAR (45) NULL DEFAULT NULL,
`approvals` VARCHAR (45) NULL DEFAULT NULL,
`bookApprovals_adminID` INT (11) NOT NULL,
PRIMARY KEY (`idAdmin`),
INDEX `fk_admin_bookApprovals1_idx` (` bookApprovals_adminID` ASC) VISIBLE,
CONSTRAINT `fk_admin_bookApprovals1`
FOREIGN KEY (`bookApprovals_adminID`)
REFERENCES `libraryRat`.`bookApprovals` (` adminID`)
REMOVE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

CREATE TABLE IF NOT EXISTED `libraryRat`.`ratings` (
`ratingID` DECIMAL (50) NOT NULL,
`bookID` INT (11) NOT NULL,
`date` DATE NULL DEFAULT NULL,
`rating` INT (11) NULL DEFAULT NULL,
`comments` VARCHAR (150) NULL DEFAULT NULL,
PRIMARY KEY (`ratingID`,` bookID`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

CREATE TABLE IF NOT EXISTED `libraryRat`.`bookRegistration` (
`userID` INT (11) NOT NULL AUTO_INCREMENT,
`date` VARCHAR (45) NULL DEFAULT NULL,
`bookID` INT (11) NOT NULL,
`name` VARCHAR (45) NULL DEFAULT NULL,
`authorID` VARCHAR (45) NULL DEFAULT NULL,
`kinds` VARCHAR (45) NULL DEFAULT NULL,
`state` VARCHAR (45) NULL DEFAULT NULL,
`books_bookID` INT (11) NOT NULL,
`isbn` VARCHAR (45) NULL DEFAULT NULL,
PRIMARY KEY (`userID`,` bookID`),
INDEX `fk_bookRegistration_books1_idx` (` books_bookID` ASC) VISIBLE,
CONSTRAINT `fk_bookRegistration_books1`
FOREIGN KEY (`books_bookID`)
REFERENCES `libraryRat`.`books` (` bookID`)
REMOVE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

CREATE TABLE IF NOT EXISTED `libraryRat`.`bookApprovals` (
`adminID` INT (11) NOT NULL AUTO_INCREMENT,
`date` VARCHAR (45) NULL DEFAULT NULL,
`bookID` VARCHAR (45) NULL DEFAULT NULL,
`name` VARCHAR (45) NULL DEFAULT NULL,
`authorID` VARCHAR (45) NULL DEFAULT NULL,
`kinds` VARCHAR (45) NULL DEFAULT NULL,
`userID` VARCHAR (45) NULL DEFAULT NULL,
`state` VARCHAR (45) NULL DEFAULT NULL,
`bookRegistration_userID` INT (11) NOT NULL,
PRIMARY KEY (`adminID`),
INDEX `fk_bookApprovals_bookRegistration1_idx` (` bookRegistration_userID` ASC) VISIBLE,
CONSTRAINT `fk_bookApprovals_bookRegistration1`
FOREIGN KEY (`bookRegistration_userID`)
REFERENCES `libraryRat`.`bookRegistration` (` userID`)
REMOVE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

CREATE TABLE IF NOT EXISTED `libraryRat`.`books_has_ratings` (
`books_bookID` INT (11) NOT NULL,
`ratings_ratingID` DECIMAL (50) NOT NULL,
`ratings_bookID` INT (11) NOT NULL,
PRIMARY KEY (`books_bookID`,` ratings_ratingID`, `ratings_bookID`),
INDEX `fk_books_has_ratings_ratings1_idx` (` assessments_ratedID` ASC, `evaluations_bookID` ASC) VISIBLE,
INDEX `fk_books_has_ratings_books_idx` (` books_bookID` ASC) VISIBLE,
CONSTRAINT `fk_books_has_ratings_books`
FOREIGN KEY (`books_bookID`)
REFERENCES `libraryRat`.`books` (` bookID`)
REMOVE NO ACTION
UPDATED NO ACTION,
CONSTRAINT `fk_books_has_ratings_ratings1`
FOREIGN KEY (`ratings_ratingID`,` ratings_bookID`)
REFERENCES `libraryRat`.`ratings` (` ratingID`, `bookID`)
REMOVE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

CREATE TABLE IF NOT EXISTED `libraryRat`.`users_has_ratings` (
`users_userID` INT (11) NOT NULL,
`ratings_ratingID` DECIMAL (50) NOT NULL,
`ratings_bookID` INT (11) NOT NULL,
PRIMARY KEY (`users_userID`,` ratings_ratingID`, `ratings_bookID`),
INDEX `fk_users_has_ratings_ratings1_idx` (` assessments_ratedID` ASC, `evaluations_bookID` ASC) VISIBLE,
INDEX `fk_users_has_ratings_users1_idx` (` users_userID` ASC) VISIBLE,
CONSTRAINT `fk_users_has_ratings_users1`
FOREIGN KEY (`users_userID`)
REFERENCES `libraryRat`.`users` (` userID`)
REMOVE NO ACTION
UPDATED NO ACTION,
CONSTRAINT `fk_users_has_ratings_ratings1`
FOREIGN KEY (`ratings_ratingID`,` ratings_bookID`)
REFERENCES `libraryRat`.`ratings` (` ratingID`, `bookID`)
REMOVE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

CREATE TABLE IF NOT EXISTED `libraryRat`.`author_has_books` (
`author_authorID` INT (11) NOT NULL,
`books_bookID` INT (11) NOT NULL,
PRIMARY KEY (`author_authorID`,` books_bookID`),
INDEX `fk_author_has_books_books1_idx` (` books_bookID` ASC) visible,
INDEX `fk_author_has_books_author1_idx` (` author_authorID` ASC) VISIBLE,
CONSTRAINT `fk_author_has_books_author1`
FOREIGN KEY (`author_authorID`)
REFERENCES `libraryRat`.`author` (` authorID`)
REMOVE NO ACTION
UPDATED NO ACTION,
CONSTRAINT `fk_author_has_books_books1`
FOREIGN KEY (`books_bookID`)
REFERENCES `libraryRat`.`books` (` bookID`)
REMOVE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;


SET SQL_MODE = @ OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS = @ OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS = @ OLD_UNIQUE_CHECKS;

Pessoal Obrigado!