Forum: Ruby on Rails create_table and char columns

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
02bd6b98b7c04f9ae5868eda3d01fb73?d=identicon&s=25 Brad Tilley (rtilley)
on 2006-04-12 14:14
When I use create_table to make a table :string always makes a varchar
column. How can I make it so that :string will make a char column?

create_table(:accounts, :options => 'ENGINE=MyISAM DEFAULT') do |table|
  # This creates a varchar column, I would like a char column.
  table.column :username, :string
  ...
end
This topic is locked and can not be replied to.