[DMIG-18] diffing causes lots of false positives (on postgresql) Created: 18/Feb/11  Updated: 16/Nov/11

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

Type: Bug Priority: Major
Reporter: Lukas Kahwe Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 2
Labels: None
Environment:

PostgreSQL 9.0



 Description   

I am playing around with the diff tool and noticing that a lot of false positives are generated, like using SERIAL creates Sequences that are not explicitly listed, causing the diff tool to believe that they should be dropped. Or using "array" as a datatype makes the diff tool believe that there was a type change since they are setup as TEXT. now the alter statement then actually specifies to alter it form TEXT to TEXT again.

I guess the fact is that just more work needs to be put in here and I guess if I want things to improve I should step up, especially if I care about such an "obsure" database as Postresql



 Comments   
Comment by Ilan [ 14/May/11 ]

I have noticed the same problems when using @GeneratedValue(strategy="IDENTITY").
Postgres will create a sequence which doctrine does not manage. When running a schema validation doctrine fails because the diff tool
believes the sequences should not be in the database.
Same problem when trying to update the schema with --complete, doctrine will run queries to drop the sequences.

Regards,

Ilan

Comment by Lukas Kahwe [ 05/Jul/11 ]

likely solved with http://www.doctrine-project.org/jira/browse/DBAL-42

Comment by Finjon Kiang [ 10/Sep/11 ]

Currently, sequences won't be dropped when using diff tool (latest version from github downloaded today). But it still drops the default value like 'nextval('xxx_seq')'. As the database wasn't used by doctrine2 only, dropping default value like that caused some problems in my environment.

Comment by Finjon Kiang [ 10/Sep/11 ]

well... the diff is not reliable currently as all the indexes, constraints were affected and serial, bigserial fields would be replaced using int and bigint...

Generated at Wed Sep 17 17:48:53 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.