Hola estoy intentando meter una base de datos en MySql y me encuentro con este problema de las claves foraneas.
Me he creado un ejemplo sencillo de mis tablas, pero incluso asi no lo consigo hacer.
Código:
CREATE TABLE `Estrategia`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
)Type=InnoDB;
CREATE TABLE `Partidas`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`id_Estrategia` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`),
INDEX `Partidas_FI_1` (`id_Estrategia`),
CONSTRAINT `Partidas_FK_1`
FOREIGN KEY (`id_Estrategia`)
REFERENCES `Estrategia` (`id`)
)Type=InnoDB;
Alguno de Ustedes ve el Fallo en Partidas. Muchas Gracias