I was setting up some fixtures for unit tests for an existing MySQL database. Using CakePHP 2.2.3 (though will likely upgrade to CakePHP 2.2.4 shortly).
I've opted to include the public $fields definition in the fixture. When loading the fixture, I would get the following error:
- Warning: Fixture creation for "comp_patient" failed "SQLSTATE[42000]: Syntax error or access violation: 1170 BLOB/TEXT column 'deceased' used in key specification without a key length" in C:\dev\projects\qds-cakephp2\src\synapse\lib\Cake\TestSuite\Fixture\CakeTestFixture.php on line 210
This seems to be caused by an index I have on a TEXT field. In the original database, the index on the deceased field has a length, but it seems that CakePHP does not import key lengths for TEXT indexes, not does it support key lengths during index creation in Datasource/Database/Mysql::_alterIndexes.
I'll probably submit this as a bug to the Lighthouse, but I just wanted to check if anyone has had any experience with this previously.
Regards
Reuben Helms
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
No comments:
Post a Comment