[DBAL-591] [GH-365] Added existence check before dropping constraints in postgres Created: 28/Aug/13  Updated: 21/Dec/13  Resolved: 21/Dec/13

Status: Resolved
Project: Doctrine DBAL
Component/s: None
Affects Version/s: None
Fix Version/s: 2.5, 2.4.2
Security Level: All

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by DBAL-584 [GH-361] Dropped indexes can have con... Resolved

 Description   

This issue is created automatically through a Github pull request on behalf of stefk:

Url: https://github.com/doctrine/dbal/pull/365

Message:

The Schema object generates distinct sql queries for altering a table and for removing a constraint or an index. However, in some cases, the `drop` query may come after an `alter table` query deleting the column to which the index/constraint was bound. In postgres, where dropping a column automatically drops its attached indexes and constraints, executing the queries in that order leads to an sql error (trying to drop something that has already been deleted -> "SQLSTATE[42704]: Undefined object").

This PR introduces a quick fix for that issue (not sure it's the best way though).



 Comments   
Comment by Doctrine Bot [ 08/Sep/13 ]

A related Github Pull-Request [GH-365] was closed:
https://github.com/doctrine/dbal/pull/365

Comment by Doctrine Bot [ 08/Sep/13 ]

A related Github Pull-Request [GH-365] was reopened:
https://github.com/doctrine/dbal/pull/365

Comment by Doctrine Bot [ 21/Dec/13 ]

A related Github Pull-Request [GH-365] was closed:
https://github.com/doctrine/dbal/pull/365

Generated at Fri Sep 04 06:27:03 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.