mysql – phpMyAdmin returns an error when importing a bank

insert the description of the image here

I do not understand how there could be an error in the syntax if I generated the code in the Workbench.

NOTE: I asked a colleague to generate the code in his Workbench and even sent me an error during the import.

Investigation:

    - Advanced MySQL Workbench Engineering

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, STRICTTRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_ENGINE_SUBSTITUTION & # 39 ;;


– Diagram of the company



– Diagram of the company


CREATE SCHEMA IF NOT EXISTING business DEFAULT CHARACTER SET utf8;
USE business ;


– table business.customer


CREATE TABLE IF NOT EXISTED business.customer (
login INT NOT NULL AUTO_INCREMENT,
name VARCHAR (75) NOT NULL,
phone VARCHAR (11) NOT NULL,
PRIMARY KEY (login))
ENGINE = InnoDB;


– table business.product


CREATE TABLE IF NOT EXISTED business.product (
login INT NOT NULL AUTO_INCREMENT,
name VARCHAR (80) NOT NULL,
price FLOAT NOT NULL,
measure FLOAT NOT NULL,
what is possible INT NOT NULL,
PRIMARY KEY (login))
ENGINE = InnoDB;


– table business.request


CREATE TABLE IF NOT EXISTED business.request (
login INT NOT NULL AUTO_INCREMENT,
dated DATETIME NOT NULL,
total value FLOAT NOT NULL,
customer_id INT NOT NULL,
PRIMARY KEY (login, customer_id)
INDEX fk_pedido_cliente_idx (customer_id ASC) VISIBLE,
Constraint fk_pedido_cliente
FOREIGN KEY (customer_id)
References business.customer (login)
REMOVE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;


– table business.produit_votre_ordre


CREATE TABLE IF NOT EXISTED business.produit_votre_ordre (
product_id INT NOT NULL,
request_id INT NOT NULL,
request_client_id INT NOT NULL,
PRIMARY KEY (product_id, request_id, request_client_id)
INDEX fk_producto_has_pedido_pedido1_idx (request_id ASC request_client_id ASC) VISIBLE,
INDEX fk_producto_has_pedido_produto1_idx (product_id ASC) VISIBLE,
Constraint fk_producto_has_pedido_produto1
FOREIGN KEY (product_id)
References business.product (login)
REMOVE NO ACTION
UPDATED NO ACTION,
Constraint fk_producto_has_pedido_pedido1
FOREIGN KEY (request_id , request_client_id)
References business.request (login , customer_id)
REMOVE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;

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