Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-591

[GH-365] Added existence check before dropping constraints in postgres

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5, 2.4.2
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      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).

        Issue Links

          Activity

          Doctrine Bot created issue -
          Hide
          Doctrine Bot added a comment -

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

          Show
          Doctrine Bot added a comment - A related Github Pull-Request [GH-365] was closed: https://github.com/doctrine/dbal/pull/365
          Hide
          Doctrine Bot added a comment -

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

          Show
          Doctrine Bot added a comment - A related Github Pull-Request [GH-365] was reopened: https://github.com/doctrine/dbal/pull/365
          Benjamin Eberlei made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.5 [ 10523 ]
          Fix Version/s 2.4.2 [ 10620 ]
          Resolution Fixed [ 1 ]
          Hide
          Doctrine Bot added a comment -

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

          Show
          Doctrine Bot added a comment - A related Github Pull-Request [GH-365] was closed: https://github.com/doctrine/dbal/pull/365
          Benjamin Eberlei made changes -
          Link This issue is duplicated by DBAL-584 [ DBAL-584 ]

          This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

          • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DBAL-591, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

            People

            • Assignee:
              Benjamin Eberlei
              Reporter:
              Doctrine Bot
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: