Bonjour a tous,

ma base de donnees s'appelle test et est constituee pour l'instant de trois tables
- ItemStatuses
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
CREATE  TABLE IF NOT EXISTS `ItemStatuses` (
  `Item_status_ID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `Item_status` CHAR(20) NOT NULL ,
  PRIMARY KEY (`Item_status_ID`) )
ENGINE = InnoDB, CHARSET utf8;
- PDFTeams
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
CREATE  TABLE IF NOT EXISTS `PDFTeams` (
  `Team_ID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `Impacted_team` CHAR(3) NOT NULL ,
  `Team_full_name` VARCHAR(30) NOT NULL ,
  PRIMARY KEY (`Team_ID`) )
ENGINE = InnoDB, CHARSET utf8;
-Items

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
CREATE  TABLE IF NOT EXISTS `Items` (
  `Item_ID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT ,
  `Item_name` VARCHAR(50) NOT NULL ,
  `Item_description` TEXT NULL ,
  `Item_status_ID` INT(11) UNSIGNED NOT NULL ,
  `Setup` TEXT NULL ,
  `username` VARCHAR(30) NOT NULL ,
  `Team_ID` INT(11) UNSIGNED NOT NULL ,
  `CreationDate` DATETIME NOT NULL ,
  `UpdateDate` DATETIME NULL ,
  `Creation` CHAR(10) NOT NULL ,
  PRIMARY KEY (`Item_ID`),
  UNIQUE (`Item_name`),
  INDEX (`Item_status_ID`),
  FOREIGN KEY (`Item_status_ID`)
  REFERENCES `ItemStatuses` (`Item_status_ID`)
  ON UPDATE NO ACTION ON DELETE CASCADE,
  INDEX (`Team_ID`),
  FOREIGN KEY (`Team_ID`)
  REFERENCES ` PDFTeams ` (`Team_ID`)
  ON UPDATE NO ACTION ON DELETE CASCADE)
ENGINE = InnoDB, CHARSET utf8;
Je cree parfaitement les deux premieres tables mais quand je veux creer la troisieme j'obtiens cette erreur:

#1005 - Can't create table 'test.items' (errno: 150)
je ne comprends pas pourquoi elle survient? Pouvez-vous m'aider?

j'utilise MySQL 5.1.30

Merci