nie mozna utworzyc tabeli :(

0

witam , mam problem z importem bazy danych , sciagnelem jedna baze danych z innego serwera za pomocą sypex dumper , potem stworzylem swieza baze danych za pomoca myphpadmin , i na ta swieza baze danych importowalem ta z sypex dumper , ale niestety caly czas wyskakuje mi ten bląd ! i nie mam pojecia co mam z tym zrobic !

Błąd
Zapytanie SQL:

#	TC`poll_answer`utf8_general_ci	;
CREATE TABLE  `poll_answer` (

 `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
 `modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
 `created` TIMESTAMP NOT NULL DEFAULT  '0000-00-00 00:00:00',
 `question_id` INT( 10 ) UNSIGNED NOT NULL ,
 `name` VARCHAR( 255 ) NOT NULL ,
 `sort_order` INT( 11 ) NOT NULL ,
PRIMARY KEY (  `id` ) ,
KEY  `question_id` (  `question_id` ) ,
CONSTRAINT  `poll_answer_ibfk_1` FOREIGN KEY (  `question_id` ) REFERENCES  `poll_question` (  `id` ) ON DELETE CASCADE
) ENGINE = INNODB AUTO_INCREMENT =290 DEFAULT CHARSET = utf8;

MySQL zwrócił komunikat: Dokumentacja

#1005 - Can't create table 'stredia_data.poll_answer' (errno: 150) (Szczegóły...)  
0

MySQL - FOREIGN KEY Constraints Documentation:

If you re-create a table that was dropped, it must have a definition that conforms to the foreign key constraints referencing it. It must have the right column names and types, and it must have indexes on the referenced keys, as stated earlier. If these are not satisfied, MySQL returns error number 1005 and refers to error 150 in the error message.

Prawdopodobnie pola na których jest zakładany klucz obcy nie są tego samego typu.

1 użytkowników online, w tym zalogowanych: 0, gości: 1