Error 1005 when creating foreign key

Milwell Sia <[email protected]>
Newsgroups gmane.comp.db.mysql.windows
Message-ID <[email protected]>
the following script produces an error:
error no. 1005
can't create table ... 

MySQL version: 5.0 
MySQL Query Browser version: 1.1.2


DROP TABLE IF EXISTS `hr`.`area`;
CREATE TABLE  `hr`.`area` (
  `ID` int(11) NOT NULL,
  `DESCRIPTION` varchar(100) NOT NULL,
  `STATUS` smallint(6) NOT NULL default '1',
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `Index_2` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `hr`.`employee`;
CREATE TABLE  `hr`.`employee` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(45) NOT NULL default '',
  `area` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `Index_2` (`area`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

ALTER TABLE `hr`.`employee` ADD CONSTRAINT `FK_employee_1` FOREIGN KEY `FK_employee_1` (`area`)
    REFERENCES `area` (`ID`)
    ON DELETE RESTRICT
    ON UPDATE RESTRICT;


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.