[PATCH] Add ability to update column attributes
Reported by Nate Wiger | March 23rd, 2008 @ 08:22 PM
Auto migrations rocks - but it doesn't properly detect changes in column attributes. That is, if you had:
t.decimal :cost, :precision => 0
And changed it to:
t.decimal :cost, :precision => 4
This would not be reflected correctly. The attached patch provides this functionality.
Also, I fixed the hardcoded index names, replacing them with AR::B.index_name (needed for Oracle compatibility). I also replaced the hardcoded "id" with get_primary_key(table_name)
Thanks for an awesome plugin!
Comments and changes to this ticket
-
defunkt March 24th, 2008 @ 02:20 PM
- Assigned user changed from Chris Wanstrath to PJ Hyett
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
- 224 Fix for precision, scale both being required Note that this patch requires the patch in #202 to be ap...