I also has this problem, The issue is that "schema generate" does not create valid MySQL syntax to create the appropriate tables.
I know how to generate the right MySQL syntax, but I would like to know how to automatically generate a valid CakePHP file schema. Or is it a bug of "schema generate"? I googled but I didn't find anything like this ;( Regards. On Aug 19, 9:54 am, PaSToReT <pastor...@gmail.com> wrote: > If you read my post, I said: > > I know that it is because of the key length is not specified in > the > schema.php, but I don't know how to do it. > > Of course, I have searched before. I know how to solve this problem in > mysql (adding the key length when you define the index), but I would > like to have a good executable schema.php for my migrations, and i > don't know how to add this parameter to it. > > May be I'm not explaining so well... sorry... :( > > Thank you anyway! > > On Aug 18, 8:17 pm, brian <bally.z...@gmail.com> wrote: > > > > > This is a MySQL issue. Did you search > > first?http://www.google.ca/search?q=used+in+key+specification+without+a+key... > > > On Tue, Aug 18, 2009 at 12:05 PM, PaSToReT<pastor...@gmail.com> wrote: > > > > Hi! > > > > I have this table in mysql: > > > > CREATE TABLE `search_index` ( > > > `id` int(11) NOT NULL auto_increment, > > > `association_key` varchar(36) collate utf8_unicode_ci NOT NULL, > > > `model` varchar(128) collate utf8_unicode_ci NOT NULL, > > > `data` longtext collate utf8_unicode_ci NOT NULL, > > > `created` datetime NOT NULL, > > > `modified` datetime NOT NULL, > > > PRIMARY KEY (`id`), > > > KEY `association_key` (`association_key`,`model`), > > > FULLTEXTKEY `data` (`data`) > > > ) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 > > > COLLATE=utf8_unicode_ci; > > > > I have generated a schema.php with 'cake schema generate'. > > > When I try to execute it ('cake schema run create') i get this error. > > > > search_index: 1170: BLOB/TEXT column 'data' used in key specification > > > without a key length > > > > I know that it is because of the key length is not specified in the > > > schema.php, but I don't know how to do it. > > > > Could anyone help me? > > > > Thanks a lot! --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---