
dm-migration cannot add a text field
Reported by Giao Phan | December 10th, 2009 @ 03:44 PM
When I try a migration like
migration 1, :test do
up do
create_table :test do
column :text, DataMapper::Types::Text
end
end down do end end
with a MYSQL DB, it creates a varchar(65536) column instead of a TEXT column. The code is first looking for the primitive inside the class (which is String), and then later looks that primitive up in the adapter type_map. It seems like we should just be looking up the type in the type_class directly?
Comments and changes to this ticket
-
Jon Leighton January 12th, 2011 @ 12:08 PM
- Milestone order changed from 0 to 0
I can confirm this. Additionally
String
does not work, it ends up doingString(50)
in the SQL rather thanVARCHAR(50)
. -
Martin Gamsjaeger (snusnu) January 12th, 2011 @ 02:05 PM
- State changed from new to unconfirmed
Can you guys confirm that this also happens against latest dm-core and dm-migrations master repos?
-
Jon Leighton January 13th, 2011 @ 03:39 AM
Hi there,
The
String
issue is no longer a problem, butDataMapper::Property::Text
ends up asString(65535)
in the SQL.Thanks
-
Piotr Solnica (solnic) March 5th, 2011 @ 10:41 AM
- State changed from unconfirmed to resolved
(from [447880407a1d677716af9748dd72bd3db4afb10d]) Migrations should use property class when fetching type_map options
[#1149 state:resolved] https://github.com/datamapper/dm-migrations/commit/447880407a1d6777...
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 »
People watching this ticket
Attachments
Referenced by
-
1149 dm-migration cannot add a text field [#1149 state:resolved] https://github.com/datamapper/dm-...