[FLOW3-general] Doctrine Migration on Adding OneToOne Relationship to TYPO3.Media:Image
Cedric Ziel
cedric at cedric-ziel.com
Tue Nov 13 09:48:50 CET 2012
Hi Karsten,
thank you for the diagnostic command; I executed it and it shows the
following:
------------------------
LATEST FOREIGN KEY ERROR
------------------------
121113 9:41:53 Error in foreign key constraint of table
car_dev/#sql-47f_fb:
FOREIGN KEY (thumbnailpath) REFERENCES typo3_media_domain_model_image
(persistence_object_identifier):
Cannot find an index in the referenced table where the
referenced columns appear as the first columns, or column types
in the table and the referenced table do not match for constraint.
Note that the internal storage type of ENUM and SET changed in
tables created with >= InnoDB-4.1.12, and such columns in old tables
cannot be referenced by such columns in new tables.
See
http://dev.mysql.com/doc/refman/5.5/en/innodb-foreign-key-constraints.html
for correct foreign key definition.
As far as I understand, I need an index-but I do not know, how exactly
this should be defined..
Thank you in advance,
Cedric
Am 13.11.2012 09:36, schrieb Karsten Dambekalns:
> Hi.
>
> On 13.11.12 01:02, Cedric Ziel wrote:
>> SQLSTATE[HY000]: General error: 1005 Can't create table
>> 'car_dev.#sql-47f_f8' (errno: 150)
> The most important piece of MySQL knowledge when dealing with FK
> constraints is how to get to the real error message:
>
> http://dev.mysql.com/doc/refman/5.1/en/show-engine.html
>
> Immediately after the error has occurred, run the following SQL:
>
> SHOW ENGINE INNODB STATUS
>
> This produces a lot of information, among them the last InnoDB error,
> and that is way more helpful than the "can't create table" from above.
>
> See http://dev.mysql.com/doc/refman/5.1/en/innodb-monitors.html for an
> explanation of all the InnoDB status output.
>
> Regards,
> Karsten
More information about the FLOW3-general
mailing list