Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-479

Doctrine2 schema-tool:update doesn't re-create foreign keys on entity change

    Details

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

      Description

      I have changed a @ManyToOne relation to another entity. My workflow was this:

      • Having @ManyToOne(targetEntity="Entity\EntityA") in the source
      • Creating the database schema
      • Changing @ManyToOne(targetEntity="Entity\EntityA") to @ManyToOne(targetEntity="Entity\EntityB")
      • Calling doctrine orm:schema-tool:update

      orm:schema-tool:update doesn't notice that and doesn't re-create the FK on MySQL and PostgreSQL (haven't tested others).

        Issue Links

          Activity

            People

            • Assignee:
              Benjamin Eberlei
              Reporter:
              Timo A. Hummel
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: