Closed solnic closed 13 years ago
This change will not be made. A length is needed in most cases, and IMHO it is bad practice to say a string is "infinite" in length regardless of the storage engine.
If you really need this it's probably possible to set using DataMapper::Property::String.length(nil)
but if it doesn't work there won't be any direct support to add it.
Setting a property with type
String
forces a limit on the length. It defaults to 50, and there is no way to un-set it.Yes, I could used
Text, :lazy => false
, but thats convoluted. Postgres has no limit on the length of VARCHAR columns, and MySQL has a 64K limit, but requires that a limit be specified. SQLite3 has no limit, even if one is specified. Several other adapters have no limit on a string-ish attribute.My suggestion would be to remove the default 50-char limit from String properties, and have no default limit. The MySQL adapter can then pick a special default, since it is the only one that needs it.
Created by Paul Sadauskas (Rando) - 2009-05-14 21:51:04 UTC
Original Lighthouse ticket: http://datamapper.lighthouseapp.com/projects/20609/tickets/850