[DDC-1172] Schema tool does not drop sequences on table drop for PostgreSql platform Created: 26/May/11 Updated: 01/Mar/13 Resolved: 17/Jun/11
|Project:||Doctrine 2 - ORM|
|Reporter:||Aigars Gedroics||Assignee:||Benjamin Eberlei|
When recreating database using
the second line fails with error that the sequence "tbl_id_seq" already exists. It's because the sequence is created without an owner column and schema tool doesn't include "drop sequence" statements in the drop SQL.
I've created a patch which fixes the problem for my environment. Revision numbers in patch is from the local SVN. Doctrine base is 2.0.5.
|Comment by Benjamin Eberlei [ 05/Jun/11 ]|
That will always drop all sequences also when you only pass some classes in there. We need to find a better solution for this problem.
|Comment by Benjamin Eberlei [ 17/Jun/11 ]|
|Comment by Pierre-Yves LEBECQ [ 01/Mar/13 ]|
I don't know if this is the right place to add a comment because this bug is quite old, and if anyone will see it but the code that fixed the reported bug seems to create a bug on my setup. The SchemaTool tries to drop two times the sequences, which produces an error.
The following SQL is generated :
ALTER TABLE utilisateurs DROP CONSTRAINT fk_497b315e7634f637;
I'm using postgres 9.1.8, Doctrine 2.3.2