Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-615

Escape platform identifiers in ALTER queries

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major 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
        Arthur Bodera added a comment - https://github.com/doctrine/dbal/pull/379
        Hide
        Doctrine Bot added a comment -

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

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

        It's not invalid.

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

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: