views:

9

answers:

1

I want to create a database field to store a GUID.

I did this:

add_column :users, :user_guid, :string, :length => 36

But it just created a column of varchar(255)

+1  A: 

Rails doesn't have length, it have limit

add_column :users, :user_guid, :string, :limit => 36
valodzka