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.

create_table with options hash

#659

create_table currently accepts an options string which defaults to 'Engine=InnoDB'. Adding additional options such as 'CHARACTER SET' causes the default 'ENGINE=InnoDB' to be overwritten. This patch allows options to be submitted via a hash and the default Engine=InnoDB is then reverse merged. This patch also preserves the previous string based functionality.

Reported by Justin Marney · July 19th, 2008 @ 01:38 AM

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

Activity

  1. Clemens Kofler
    Clemens Kofler
    • Tag changed from migrations, patch, tested to activerecord, migrations, patch, tests

    I think this would be a bad idea because this way you can't specify stuff that isn't in the key=value format like e.g. partition options. Look at the CREATE TABLE docs for MySQL for example.

    What you could probabably do instead is have a Regexp that checks if the ENGINE option is set and otherwise default it to InnoDB.

    July 19th, 2008 @ 12:19 PM

  2. josh
    josh
    • State changed from new to wontfix

    October 28th, 2008 @ 04:28 PM