
Incorrect Enum type representation
Reported by Foo Bar | March 21st, 2011 @ 09:42 AM
require 'rubygems'
require 'dm-core'
require 'dm-types'
require 'dm-validations'
require 'dm-timestamps'
require 'dm-migrations'
DataMapper.setup(:default, "mysql://")
class Test
include DataMapper::Resource
property :id, Serial
property :result, Enum[ :ok, :not_ok ], :default => 0
end
DataMapper.auto_upgrade!
gives out:
CREATE TABLE IF NOT EXISTS `tests` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`result` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
why signed int(11) and default NULL ?
Comments and changes to this ticket
-
Piotr Solnica (solnic) March 21st, 2011 @ 10:49 AM
- State changed from new to not-applicable
Use :default => :ok
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »