This project is archived and is in readonly mode.

#659 ✓wontfix
Justin Marney

create_table with options hash

Reported by Justin Marney | July 19th, 2008 @ 01:38 AM | in 2.x

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.

Comments and changes to this ticket

  • Clemens Kofler

    Clemens Kofler July 19th, 2008 @ 12:19 PM

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

  • josh

    josh October 28th, 2008 @ 04:28 PM

    • State changed from “new” to “wontfix”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages