#1306 ✓resolved
Marcin Kulik

auto_upgrade for Enum/Flag proporties fails

Reported by Marcin Kulik | June 5th, 2010 @ 07:15 AM

Hey, just found out that after property refactor autoupgrading Enum/Flag properties with default value fails. See here:

http://gist.github.com/426546

property_schema_hash method (from dm-do-adapter.rb in dm-migrations) would dump this :new value correctly to integer but property.type is nil which doesn't respond to dump obviosuly so it returns unaltered value (:new).

This generates SQL like:

create table .... status INTEGER DEFAULT 'new' ...

which is wrong.

I've tried to investigate and fix the problem but I don't know if type being nil is good or bad thing so I don't know if it should be fixed in property_schema_hash method or somewhere upstream.

Comments and changes to this ticket

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Attachments

Referenced by

Pages