Answer the question
In order to leave comments, you need to log in
Why "#1215 - Unable to add foreign key constraints" in SQL?
I'm trying to import a table after moving to another host, but I get an error: #1215 - Unable to add foreign key constraints
CREATE TABLE `result_info` (
`id` int(11) NOT NULL,
`wk2_id` int(11) NOT NULL,
`status` int(11) NOT NULL DEFAULT '0',
`inc_all` decimal(16,2) NOT NULL DEFAULT '0.00',
`exp_all` decimal(16,2) NOT NULL DEFAULT '0.00',
`profit` decimal(16,2) NOT NULL,
`comment` varchar(1000) COLLATE utf8_bin NOT NULL,
`user_id` int(11) NOT NULL,
`created_at` datetime NOT NULL,
`changed_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question