Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-157

Exception given when updating schema

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.5
    • Component/s: Schema Managers
    • Labels:
      None
    • Environment:
      Mac OSX 10.6.7
      PHP 5.3.4

      Description

      Been experimenting with Symfony2 past days, and somehow managed to generate an Exception in the MySqlSchemaManager Classes of Doctrine.

      I've build my schema once, the next time i run the command i'm receiving following error:

      [ErrorException]
      Notice: Undefined index: default in /Users/chris/Sites/Symfony/vendor/doctrine-dbal/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php line 157

      i can't figure out an error in my classes.

      When i drop the database table, i can re-run the command again without exception.. even though another run it will throw it up again.

      I've checked the code in line #157, and adpted it slightls:

      prev:

      'default' => $tableColumn['default'],

      modified:
      'default' => (isset($tableColumn['default'])) ? $tableColumn['default'] : null,

      Can anyone confirm this issue?

      Greetings,
      Chris

        Activity

        Hide
        Chris K added a comment - - edited

        Hi, I'm also seeing this exact issue using Sf2 and Doctrine. You can't use the console to force update the schema, you have to completely drop all of the tables to get the command to work again. Also using Mac locally.

        Show
        Chris K added a comment - - edited Hi, I'm also seeing this exact issue using Sf2 and Doctrine. You can't use the console to force update the schema, you have to completely drop all of the tables to get the command to work again. Also using Mac locally.
        Hide
        Benjamin Eberlei added a comment -

        Interesting that some MySQL versions dont seem to have the default field then in information_schema?

        Show
        Benjamin Eberlei added a comment - Interesting that some MySQL versions dont seem to have the default field then in information_schema?
        Hide
        Benjamin Eberlei added a comment -

        Fixed, will be in 2.1.4

        Show
        Benjamin Eberlei added a comment - Fixed, will be in 2.1.4

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Chris
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: