Doctrine Migrations
  1. Doctrine Migrations
  2. DMIG-15

Drop not null is not working in Postgres

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Labels:
      None
    • Environment:
      Postgresql 8.4, Symfony 1.4, Doctrine 1.2

      Description

      When removing the not null from a column the migration does not change anything in the database. This is due to the following check on line 162 of lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Export/Pgsql.php

      if ( ! empty($field['definition']['notnull']))

      So if notnull is not there or set to false or '0' or 0 the code does not enter into that if statement and therefore no changes are done to the not null value of the column.

        Activity

        Hide
        Lea Haensenberger added a comment -

        I recreated the bug report in the doctrine 1 project since it rather belongs there.

        Show
        Lea Haensenberger added a comment - I recreated the bug report in the doctrine 1 project since it rather belongs there.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: