Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-570

[GH-349] Existing columns not found (at least in mysql)

    Details

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

      Description

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

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

      Message:

      Existing columns in the database were not found since database name was being used instead of just the db name part of the dsn.
      Two examples where I ran into this

      • Schema tool trying to create existing columns over and over again.
      • Migrations not being able to set a primary key for columns created earlier.

      Note that this fix is quite basic it might the case the conversion has to happen earlier on in the code for example by adding a 'getDatabaseName()' method to \Doctrine\DBAL\Connection or maybe just apply it in \Doctrine\DBAL\Platforms\MySqlPlatform::getListTableIndexesSQL()?

      Please let me know

        Activity

        Hide
        Doctrine Bot added a comment -

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

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

        PR was closed

        Show
        Benjamin Eberlei added a comment - PR was closed

          People

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

            Dates

            • Created:
              Updated:
              Resolved: