Quand je veux créer mes tables j'ai comme erreur ceci :
#1005 - Can't create table '.\immo\annonce.frm' (errno: 150)
Et le problème est que je ne comprend pas pourquoi ?
Mes TABLES
D'avance merciCREATE TABLE DIRECTORY (
id_directory INT NOT NULL AUTO_INCREMENT,
name VARCHAR(75) NOT NULL,
CONSTRAINT directory_id_directory PRIMARY KEY (id_directory));
CREATE TABLE FILE (
id_file INT NOT NULL AUTO_INCREMENT,
id_directory NUMERIC(16) NOT NULL,
name VARCHAR(75) NOT NULL,
CONSTRAINT file_id_file PRIMARY KEY (id_file),
CONSTRAINT file_id_directory FOREIGN KEY (id_directory) references DIRECTORY(id_directory));
CREATE TABLE ANNONCE (
id_annonce INT NOT NULL AUTO_INCREMENT,
id_directory NUMERIC(16) NOT NULL,
type VARCHAR(30) NOT NULL,
prix DECIMAL(10,2) NOT NULL,
codepostal DECIMAL(5,0) NOT NULL,
nb_chambre DECIMAL(2) NOT NULL,
nb_garage DECIMAL(2) NOT NULL,
nb_file DECIMAL(1) NOT NULL,
CONSTRAINT annonce_id_annonce PRIMARY KEY (id_annonce),
CONSTRAINT file_id_directory FOREIGN KEY (id_directory) references DIRECTORY(id_directory));
Ce que l'on apprend par l'effort reste toujours ancré beaucoup plus longtemps.