Hello,
I am getting the error message:
#1005 - Can't create table './wagconsulting/job_hr_contact_disp_yn.frm' (errno: 150)
I am using MySQL 5.0.37-log
The Primary Key table definition is:
----------------------------------------------------------------------
create table job
(
job_id mediumint unsigned auto_increment,
job_title varchar (120) not null,
job_desc text not null,
primary key (job_id),
) type=innodb;
----------------------------------------------------------------------
And the Foreign Ket table definition is:
----------------------------------------------------------------------
create table job_hr_contact_disp_yn
(
job_id mediumint unsigned not null,
emp_name char (1),
email char (1),
index jhr_contacts_disp_index (job_id),
foreign key (job_id) references job (job_id) on delete cascade
) type=innodb;
----------------------------------------------------------------------
The datatypes for the PK and FK are exactly the same.
I also tried by removing the index clause from the FK table, but still getting the same error message.
Your kind help is highly appreciated
Best Regards,
Amir Khan
I am getting the error message:
#1005 - Can't create table './wagconsulting/job_hr_contact_disp_yn.frm' (errno: 150)
I am using MySQL 5.0.37-log
The Primary Key table definition is:
----------------------------------------------------------------------
create table job
(
job_id mediumint unsigned auto_increment,
job_title varchar (120) not null,
job_desc text not null,
primary key (job_id),
) type=innodb;
----------------------------------------------------------------------
And the Foreign Ket table definition is:
----------------------------------------------------------------------
create table job_hr_contact_disp_yn
(
job_id mediumint unsigned not null,
emp_name char (1),
email char (1),
index jhr_contacts_disp_index (job_id),
foreign key (job_id) references job (job_id) on delete cascade
) type=innodb;
----------------------------------------------------------------------
The datatypes for the PK and FK are exactly the same.
I also tried by removing the index clause from the FK table, but still getting the same error message.
Your kind help is highly appreciated
Best Regards,
Amir Khan