0

I cannot create this table due to a foreign key error. The error message is:

Can't create table 'CHECKERS.MOVEPOSITION' (errno: 150)

CREATE TABLE CHECKERS.MOVEPOSITION (
  moveposition_id int NOT NULL auto_increment,
  game_id int NOT NULL,
  participant_id int NOT NULL,
  square_id int NOT NULL,
  move_type_id int NOT NULL,
  move_order varchar(32) NOT NULL,
  from_position varchar(32) NOT NULL,
  to_position varchar(32) NOT NULL,
  PRIMARY KEY (moveposition_id),
  FOREIGN KEY (square_id) REFERENCES PIECE (square_id),
  FOREIGN KEY (participant_id) REFERENCES PARTICIPANT (participant_id)
);

I'm wondering if someone used to creating tables with multiple foreign keys could help?

Obsidian Age
  • 41,205
  • 10
  • 48
  • 71

0 Answers0