Doctrine 1
  1. Doctrine 1
  2. DC-117

Doctrine_Migration_Base: methods to set default table options

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.0-ALPHA2
    • Fix Version/s: 1.2.0-ALPHA3
    • Component/s: Migrations
    • Labels:
      None
    • Environment:
      Darwin, PHP 5.3, MacBook

      Description

      I have implemented a very small - and unobtrusive - change to Doctrine_Migration_Base that enables users to set application-level default table options for Doctrine_Migration_Base::createTable().

      I implemented this change some time ago in a custom migration class. I wanted my migrations to always create INNODB and UTF-8-ready tables without having to always specify options. I blogged about it and others were interested.

      In your boot script - for example - set default table options like:

      Doctrine_Migration_Base::setDefaultTableOptions(array(
      'type' => 'INNODB',
      'charset' => 'utf8',
      'collate' => 'utf8_unicode_ci',
      ));

      The enclosed patch, which includes tests, was created against 1.2 r6535.

      Thanks

        Activity

        Hide
        Guilherme Blanco added a comment -

        In revision 6540 I committed your suggested patch! Thanks!

        Show
        Guilherme Blanco added a comment - In revision 6540 I committed your suggested patch! Thanks!

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Dan Bettles
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: