Uploaded image for project: 'Doctrine DBAL'
  1. Doctrine DBAL
  2. DBAL-615

Escape platform identifiers in ALTER queries

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 2.4, 2.4.1
    • Fix Version/s: None
    • Component/s: Platforms
    • Labels:
      None

      Description

      PR302 introduced platform quoting for manipulation of PK, FK and indexes. Alter queries are left unquoted, which means that ALTER with table names that happen to be reserved platform keywords, will fail.

      For example:

      ALTER TABLE order DROP FOREIGN KEY FK_F5299398D5289B7F;
      ALTER TABLE set DROP FOREIGN KEY FK_E61425DC1BF22D93;
      ALTER TABLE storage ADD CONSTRAINT FK_547A1B3487068541 FOREIGN KEY (`addressId`) REFERENCES `address` (`id`);
      

        Activity

        Show
        thinkscape Arthur Bodera added a comment - https://github.com/doctrine/dbal/pull/379
        Hide
        doctrinebot Doctrine Bot added a comment -

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

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

        It's not invalid.

        Discussion here: https://github.com/doctrine/dbal/pull/379

        Show
        thinkscape Arthur Bodera added a comment - It's not invalid. Discussion here: https://github.com/doctrine/dbal/pull/379

          People

          • Assignee:
            beberlei Benjamin Eberlei
            Reporter:
            thinkscape Arthur Bodera
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: