Doctrine Migrations
  1. Doctrine Migrations
  2. DMIG-37

PostgreSQL generated SQL statements in migrations that use doublequotes create syntax errors in PHP

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Environment:
      PostgreSQL backend, using migration versions with field or schemanames that use reserved names.

      Description

      When using some reserved field names in PostgreSQL DBAL, the generated SQL statements will quote those field names. (Make a table with fieldname "left" for example)

      When the migrationversion is generated, the doublequote is not escaped:

      addSQL("ALTER table x add column "left" integer");

      This does not compile of course, should be

      addSQL("ALTER table x add column \"left\" integer");

      Regards!

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            jos de witte
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: