Skip to content

Loading…

DBAL-591: [GH-365] Added existence check before dropping constraints in postgres #1803

Closed
doctrinebot opened this Issue · 5 comments

2 participants

@doctrinebot

Jira issue originally created by user @doctrinebot:

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

Url: #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).

@doctrinebot

Comment created by @doctrinebot:

A related Github Pull-Request [GH-365] was closed:
#365

@doctrinebot

Comment created by @doctrinebot:

A related Github Pull-Request [GH-365] was reopened:
#365

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot

Comment created by @doctrinebot:

A related Github Pull-Request [GH-365] was closed:
#365

@doctrinebot doctrinebot added the Bug label
@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.4.2 milestone
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.