Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-360

[GH-212] Fix dropping foreign key multiple times with test

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.1
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

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

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

      Message:

      In some cases the Comparator class returns multiple drops for the same foreign key.
      Specifically, in case you have two tables, A & B, with A having a foreign key FK
      referencing B, if you drop table B, the resulting diff shows this FK twice,
      once on the diff->orphanedForeignKeys array as we're deleting B, and another on
      the diff->changedTables array as table A is also being modified. As a result of this you
      get the DROP FOREIGN KEY instruction twice in the final SQL.

        Activity

        Benjamin Eberlei created issue -
        Sergi de Pablos made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Trivial [ 5 ]
        Benjamin Eberlei made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.3.1 [ 10325 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Benjamin Eberlei
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: