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.

This project is archived and is in readonly mode.

changed_column_default losing null for mysql

#617

This is a forward-port of the patch in http://dev.rubyonrails.org/ticke... "change_column_default loses NOT NULL setting in MySQL and SQL Server" and also adds change_column_null to the mysql and sqlite adapters to keep feature-parity with postgresql.

I could separate the patches but since my implementation of change_column_null in mysql depends on the rest of the changes I've decided to keep them in one patch. Let me know if this is a problem.

Tested on mysql 5.0.60 with both strict mode on and off. Also tested on sqlite 3.5.9 and postgresql 8.3.1 (though for postgresql the only change is the addition of a test).

Reported by Tarmo Tänav · July 14th, 2008 @ 07:57 AM

State: resolved
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Repository
    Repository
    • State changed from new to resolved

    (from [07578ac85585d3c64d4d38d4892fd31582c7c473]) Fixed mysql change_column_default to not make the column always nullable.

    Also added change_column_null to both mysql and sqlite to keep the api features closer to postgresql.

    [#617 state:resolved]

    http://github.com/rails/rails/co...

    July 14th, 2008 @ 09:41 PM

  2. Repository
    Repository

    (from [3f48a97f688d0d0e666ad11d0a9e67baefebcacd]) Fixed mysql change_column_default to not make the column always nullable.

    Also added change_column_null to both mysql and sqlite to keep the api features closer to postgresql.

    [#617 state:resolved]

    http://github.com/rails/rails/co...

    July 15th, 2008 @ 09:35 PM