0

Am trying to reference admins table to activity log table but it is failing yet i have correctly formed it.

BELOW IS THE SQL ERROR

Error

SQL query:

ALTER TABLE activity_log_admins ADD FOREIGN KEY (adminid) REFERENCES admins(adminid)

MySQL said: Documentation
#1005 - Can't create table `miu`.`activity_log_admins` (errno: 150 "Foreign key constraint is incorrectly formed")

Please help me how to figure it out?

jarlh
  • 42,561
  • 8
  • 45
  • 63

0 Answers0