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.

Michael Schuerig's latest activity

Monday, April 27 2009
2515 db:schema:dump with PostgreSQLAdapter dumps multiple column indexes in undefi... was updated in Ruby on Rails
  • Michael Schuerig
    Michael Schuerig commented at 12:57 PM

    Tarmo, Kevin: I agree, it's better not to hard code the number of index columns.

    Have a look at the attached patch that gets rid of the second explicit SQL stat...

Saturday, April 25 2009
2564 AC::Request#content_type should return a string was updated in Ruby on Rails
  • Michael Schuerig
    Michael Schuerig commented at 10:49 PM

    That one bows up instantly as there are still references to ActionController::RewindableInput which doesn't exist anymore.

  • Michael Schuerig
    Michael Schuerig commented at 9:52 PM

    I just found out that the solution isn't that easy. It just blows up in another place, namely in request verification where it is assumed that request.content_t...

  • Michael Schuerig
    Michael Schuerig created the ticket at 7:37 PM

    Today, I git pulled rails 2-3-stable and (inadvertently) updated rack to 1.0.0, therefore I can definitely tell who's at fault, it might even be me. Anyway, Rac...

2515 db:schema:dump with PostgreSQLAdapter dumps multiple column indexes in undefi... was updated in Ruby on Rails
  • Michael Schuerig
    Michael Schuerig commented at 6:33 PM

    Tarmo, your version gets the order right, but at the price of two queries and parsing in ruby. You can have it all in one query:

    
    SELECT i.relname, d.indisuni...
  • Michael Schuerig
    Michael Schuerig commented at 9:51 AM

    Please consider using the patch I attached to #2400. I does sort by attribute order.

Sunday, April 05 2009
2419 [Patch] Raise specific exceptions for violated database constraints was updated in Ruby on Rails
  • Michael Schuerig
    Michael Schuerig commented at 11:51 AM

    I would have much preferred to dispatch on error codes for all databases, unfortunately this doesn't appear to be possible with the drivers as they are.

    The pg ...

  • Michael Schuerig
    • Tag changed from activerecord, constraint, exception, foreign-key, uniqueness to activerecord, constraint, exception, foreign-key, patch, uniqueness
    by Michael Schuerig at 9:20 AM

    Jason, I've considered your idea, and while I'm all for providing as much information as possible in an exception, I'm not sure whether it is really a good idea...

  • Michael Schuerig
    Michael Schuerig commented at 8:56 AM

    I've added the original adapter exception to ActiveRecord::InvalidStatement (and descendents).

    Using a separate class for the mapping seems a bit like overkill ...

  • Michael Schuerig
    • Title changed from Raise specific exceptions for violated database constraints to [Patch] Raise specific exceptions for violated database constraints
    by Michael Schuerig at 12:55 AM