Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: Import/Export
    • Labels:
      None
    • Environment:
      Mac OS X 10.6, doctrine 1.2, symfony 1.4, postgres 8.4

      Description

      Doctrine_Migration_Base::changeColumn doesn't change the DB column when using Postgres.

      In Doctrine_Export_Pgsql::alterTableSql it checks for an index 'type' in the $field array, but the 'type' index is in $field['definition'], so we never enter there. Furthermore it then tries to get the type declaration with $this->conn->datatype->getTypeDeclaration($field['definition']) but there is no datatype property on the collection.
      The attached patch should fix these problems.

      1. doctrine.patch
        2 kB
        Lea Haensenberger

        Activity

        Hide
        Lukas Kahwe added a comment -

        hmm .. seems like a refactoring issue with the old MDB2 code. same issue could be in other places too.

        Show
        Lukas Kahwe added a comment - hmm .. seems like a refactoring issue with the old MDB2 code. same issue could be in other places too.
        Hide
        Lukas Kahwe added a comment -

        may i commit the patch?

        Show
        Lukas Kahwe added a comment - may i commit the patch?
        Hide
        Jonathan H. Wage added a comment -

        Do the other drivers reference the 'definition' too?

        Show
        Jonathan H. Wage added a comment - Do the other drivers reference the 'definition' too?
        Hide
        Jonathan H. Wage added a comment -

        The other classes don't seem to reference the 'definition'. It looks like the information is right in the root of the array, why is it different in this case?

        Show
        Jonathan H. Wage added a comment - The other classes don't seem to reference the 'definition'. It looks like the information is right in the root of the array, why is it different in this case?
        Hide
        Lukas Kahwe added a comment -

        ok the patch has been committed.

        the others do also reference 'definition', its just that for mysql and sqlite the code is simpler because there you can just give a new definition, in postgresql you need to explicitly pass what you want to change and therefore the code needs to work differently.

        Show
        Lukas Kahwe added a comment - ok the patch has been committed. the others do also reference 'definition', its just that for mysql and sqlite the code is simpler because there you can just give a new definition, in postgresql you need to explicitly pass what you want to change and therefore the code needs to work differently.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Lea Haensenberger
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: