-
-
Notifications
You must be signed in to change notification settings - Fork 238
Closed
Description
Example schema:
CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL,
`name` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `managers` (
`id` int(10) unsigned NOT NULL,
`user_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
Running this gives this error:
ERROR 1105 (HY000): missing index for foreign key `` on the referenced table `users`
Metadata
Metadata
Assignees
Labels
No labels