Hi, I can't manage to get an unsigned int column with activerecord migration, I am using this definition: create_table :emails, :use_big_id => true do |t| t.column "destination", :string, :limit => 60, :null => false t.column "object", :string, :limit => 200, :null => false t.column "options", :string, :null => false t.column "created_at", :datetime, :null => false # FK t.column "user_id", :bigint, :unsigned => true, :null => false end isn't the ":unsigned => true" supposed to create an unsigned column ?
on 2007-04-09 16:14
on 2007-04-09 17:06
If you're absolutely sure you're going to be using a DBMS that supports it, you can use t.column :my_unsigned_int, :"int unsigned" to get what you want. If you need something other than the default limit on int there... t.column :my_unsigned_int, :"int(24) unsigned" should do the job. RSL
on 2007-04-10 13:39
Thanks for your answer, I will try that. I am using mysql and it won't change on this project.