On Monday, October 21, 2013 7:22:46 PM UTC-7, Douglas Teoh wrote:
> I am wondering if it is possible, whether through the API or monkey
> patching, such that when I make a migration, eg.
>
> create_table :users do
> String :name
> end
>
> That the generated column type for 'name' is 'VARCHAR(255 CHAR)' instead
> of 'VARCHAR(255)'. The significance of this is that the column will use
> character semantics instead of byte semantics, which is important when
> dealing with character sets such as UTF8.
>
Here's two options, you probably want the first:
self.default_string_column_size = '255 CHAR'
create_table :users do
String :name
end
# or
create_table :users do
String :name, :size=>'255 CHAR'
end
Thanks,
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/groups/opt_out.