par
dunbar » 26 nov. 2006, 20:09
Bonjour,
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
CREATE 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));
D'avance merci
Bonjour,
Quand je veux créer mes tables j'ai comme erreur ceci :
[color=red]#1005 - Can't create table '.\immo\annonce.frm' (errno: 150) [/color]
Et le problème est que je ne comprend pas pourquoi ?
Mes TABLES
[quote]
CREATE 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));[/quote]
D'avance merci