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.

Don't add DEFAULT NULL to column definitions

#334

Commit 10ef65a3b054270ed3d458ec8eb7c2b9a3e638f7 introduced a strange side-effect to create table definitions. It causes DEFAULT NULL to be included all the time. Some databases are ok with this, but some are not. Example:

`title` varchar(255) DEFAULT NULL NULL

Patch attached to omit passing :default option to #add_column_options! if it is nil.

Reported by Nick Sieger · June 5th, 2008 @ 02:27 AM

State: committed
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Repository
    Repository
    • Tag set to activerecord, migrations, tested

    (from [30370227890dc950f1544b7b1040aa75e505f877]) Fixed that create database statements would always include "DEFAULT NULL" (Nick Sieger) [#334 status:committed]

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

    July 14th, 2008 @ 04:14 PM

  2. DHH
    DHH
    • State changed from new to committed

    July 14th, 2008 @ 04:36 PM

  3. Repository
    Repository

    (from [275c3ab2a7aac60ad30ab027d1f0b1f041fb016d]) Fixed that create database statements would always include "DEFAULT NULL" (Nick Sieger) [#334 status:committed]

    Conflicts:

    activerecord/CHANGELOG

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

    July 15th, 2008 @ 11:56 PM

  4. Ryan Bigg
    Ryan Bigg
    • Tag cleared.

    Automatic cleanup of spam.

    October 11th, 2010 @ 12:09 PM

  5. bingbing