Assuming you're using MySQL, this is probably because you're in UTF-8 mode and MySQL uses 3 bytes for each UTF8 character.
DM 0.10 defaults to the TEXT SQL type (65k/3 = ~21k) for the Text primitive (Json/Yaml/etc are built on it), but can auto-size any Text- based field when a maximum length is specified. Try passing the option :length => 2**24-1 (MEDIUMTEXT) or :length => 2**32-1 (LONGTEXT) to your Json property, and call ::DataMapper.auto_migrate! again. cheers, --jordan On Sep 20, 2009, at 12:37 AM, Jos Elkink wrote: > Hi all, > > I just upgraded to 0.10 and one feature suddenly doesn't work > anymore. I have a field of type Json (from dm-types) and when I use > the migrate command, it tries to create a varchar(65535) field, > while the maximum is apparently 21845 ... Did anyone else experience > this? What is the easiest solution? > > Jos > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---
