Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

[PATCH] Add ability to update column attributes

#202

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!

Reported by Nate Wiger · March 23rd, 2008 @ 08:22 PM

State: new
Milestone: none
Assigned to: PJ Hyett PJ Hyett

Activity

  1. Nate Wiger
    Nate Wiger

    Here's a much better patch that uses Struct.each_pair to dynamically get a list of all attributes.

    March 24th, 2008 @ 01:21 PM

  2. defunkt
    defunkt
    • Assigned user changed from Chris Wanstrath to PJ Hyett

    March 24th, 2008 @ 02:20 PM

  3. Nate Wiger
    Nate Wiger
    • Tag set to auto_migrations, enhancement, patch

    Hey guys, anything going on with this? Is the auto_migrations plugin still being actively maintained??

    June 30th, 2008 @ 10:13 PM

  4. 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.