I have created an EER and want to forward eng it but i keep on recieving this error.this is the error massager the script for the sql
<code>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 '
CONSTRAINT `fk_artwork_artist`
FOREIGN KEY (`artist_id`)
REFERENCE...' at line 10
SQL Code:
CREATE TABLE IF NOT EXISTS `a_work`.`artwork` (
`artwork_id` INT NOT NULL,
`title` VARCHAR(45) NOT NULL,
`year` YEAR(4) NOT NULL,
`period` VARCHAR(25) NOT NULL,
`type` VARCHAR(20) NOT NULL,
`file` MEDIUMBLOB NOT NULL,
`artist_id` INT NOT NULL,
PRIMARY KEY (`artwork_id`),
INDEX `fk_artwork_artist_idx` (`artist_id` ASC) VISIBLE,
CONSTRAINT `fk_artwork_artist`
FOREIGN KEY (`artist_id`)
REFERENCES `a_work`.`artist` (`artist_id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
SQL script execution finished: statements: 11 succeeded, 1 failed
Fetching back view definitions in final form.
Nothing to fetch
</code>
<code>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 '
CONSTRAINT `fk_artwork_artist`
FOREIGN KEY (`artist_id`)
REFERENCE...' at line 10
SQL Code:
CREATE TABLE IF NOT EXISTS `a_work`.`artwork` (
`artwork_id` INT NOT NULL,
`title` VARCHAR(45) NOT NULL,
`year` YEAR(4) NOT NULL,
`period` VARCHAR(25) NOT NULL,
`type` VARCHAR(20) NOT NULL,
`file` MEDIUMBLOB NOT NULL,
`artist_id` INT NOT NULL,
PRIMARY KEY (`artwork_id`),
INDEX `fk_artwork_artist_idx` (`artist_id` ASC) VISIBLE,
CONSTRAINT `fk_artwork_artist`
FOREIGN KEY (`artist_id`)
REFERENCES `a_work`.`artist` (`artist_id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
SQL script execution finished: statements: 11 succeeded, 1 failed
Fetching back view definitions in final form.
Nothing to fetch
</code>
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 '
CONSTRAINT `fk_artwork_artist`
FOREIGN KEY (`artist_id`)
REFERENCE...' at line 10
SQL Code:
CREATE TABLE IF NOT EXISTS `a_work`.`artwork` (
`artwork_id` INT NOT NULL,
`title` VARCHAR(45) NOT NULL,
`year` YEAR(4) NOT NULL,
`period` VARCHAR(25) NOT NULL,
`type` VARCHAR(20) NOT NULL,
`file` MEDIUMBLOB NOT NULL,
`artist_id` INT NOT NULL,
PRIMARY KEY (`artwork_id`),
INDEX `fk_artwork_artist_idx` (`artist_id` ASC) VISIBLE,
CONSTRAINT `fk_artwork_artist`
FOREIGN KEY (`artist_id`)
REFERENCES `a_work`.`artist` (`artist_id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
SQL script execution finished: statements: 11 succeeded, 1 failed
Fetching back view definitions in final form.
Nothing to fetch
I have try everything chatgpt reading the document that comes with mysql