Problem creating my first database , annoying error I created two tables:


person (id as pk , person and purchase)
user (id as pk , other columns not relevant to question).


After linking the two with an n:m relationship, and proceeding to forward engineer (I'm using MySql Workbench), I get this error:


  Error:  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 ' INDEX
  fk_table1_has_user_table1_idx (table1_id ASC) VISIBLE, CONSTRAINT' at
  line 8


Note: I'm following a tutorial. As far as I can tell, my code's the exact same as what's in the tutorial, and the tutorial guy didn't get an error.

SQL Code:

-- Table mydb.table1_has_user -- 
-----------------------------------------------------
 CREATE TABLE IF NOT EXISTS mydb.table1_has_user
      ( table1_id INT NOT NULL,
        user_user id INT NOT NULL,
        PRIMARY KEY (table1_id, user_user id),
        INDEX fk_table1_has_user_user1_idx (user_user id ASC) VISIBLE,
        INDEX fk_table1_has_user_table1_idx (table1_id ASC) VISIBLE,
        CONSTRAINT fk_table1_has_user_table1 FOREIGN KEY (table1_id)
            REFERENCES mydb.table1 (id) ON DELETE NO ACTION ON UPDATE NO ACTION,
        CONSTRAINT fk_table1_has_user_user1 FOREIGN KEY (user_user id) 
            REFERENCES mydb.user (user id) ON DELETE NO ACTION ON UPDATE NO ACTION
     ) ENGINE = InnoDB

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

Fetching back view definitions in final form.
Nothing to fetch


Can someone please help me with this? I don't know what I'm doing wrong , the primary key is correct why is this happening?

This is the diagram of the database I'm trying to create:
The keyword VISIBLE is a MySQL-8.0 syntax. If you are using an earlier version, or MariaDB, omit this word.