[DMIG-15] Drop not null is not working in Postgres Created: 16/Nov/10  Updated: 16/Nov/10  Resolved: 16/Nov/10

Status: Resolved
Project: Doctrine Migrations
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Lea Haensenberger Assignee: Jonathan H. Wage
Resolution: Won't Fix Votes: 0
Labels: None

Postgresql 8.4, Symfony 1.4, Doctrine 1.2


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.

Comment by Lea Haensenberger [ 16/Nov/10 ]

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

Generated at Tue Dec 01 02:43:39 EST 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.