Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-807

Index renaming in postgresql does not work when index relates to table inside namespace

    Details

    • Type: Bug Bug
    • Status: In Progress
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.5
    • Fix Version/s: None
    • Component/s: Platforms
    • Security Level: All
    • Labels:
      None

      Description

      CREATE SCHEMA test;
      CREATE TABLE test.table_name (id INT);
      CREATE INDEX idx_1 ON test.table_name (id);
      

      If index would be renamed, generated sql is:

      ALTER INDEX idx_1 RENAME TO new_index_name;
      

      But valid sql code should be:

      ALTER INDEX test.idx_1 RENAME TO new_index_name;
      

        Issue Links

          Activity

          Hide
          Steve Müller added a comment -

          Artur Eshenbrener Can you please provide more details about your use case so that we can reproduce it better. How do you get the wrong SQL?

          Show
          Steve Müller added a comment - Artur Eshenbrener Can you please provide more details about your use case so that we can reproduce it better. How do you get the wrong SQL?
          Hide
          Artur Eshenbrener added a comment -

          I've pushed failing test, reproduces this problem.
          https://github.com/doctrine/dbal/pull/532

          Show
          Artur Eshenbrener added a comment - I've pushed failing test, reproduces this problem. https://github.com/doctrine/dbal/pull/532
          Hide
          Doctrine Bot added a comment -

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

          Show
          Doctrine Bot added a comment - A related Github Pull-Request [GH-532] was closed: https://github.com/doctrine/dbal/pull/532
          Hide
          Steve Müller added a comment -
          Show
          Steve Müller added a comment - Patch supplied in PR: https://github.com/doctrine/dbal/pull/533

            People

            • Assignee:
              Steve Müller
              Reporter:
              Artur Eshenbrener
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: