Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-3365

Indexes and uniqueConstraints has been ignored

    Details

    • Type: Bug Bug
    • Status: Awaiting Feedback
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Tools
    • Security Level: All
    • Labels:
      None
    • Environment:
      Ubuntu 12.04 with MySQL 5.5 and PHP 5.4

      Description

      I using the Doctrine Migrations and when I declared my entity with the indexes section, the index name has been ignored. It's like this:

      indexes:
      IDX_ADDRESS_CITY:
      columns: city_id

      but, the diff tools ignore it and give me this code:
      $this->addSql("CREATE INDEX IDX_7299B5238BAC62AF ON tb_address (city_id)");

      and it should be:
      $this->addSql("CREATE INDEX IDX_ADDRESS_CITY ON tb_address (city_id)");

      Notice: I open the same bug on the migrations repository in github and @kimhemsoe told me to open here, since this is generated by DBAL component.

      1. dbal-fixing-373.patch
        4 kB
        Diego Oliveira
      2. orm-fixing-373.patch
        2 kB
        Diego Oliveira

        Activity

        Diego Oliveira created issue -
        Diego Oliveira made changes -
        Field Original Value New Value
        Description I using the Doctrine Migrations and when I declared my entity with the indexes section, the index name has been ignored. It's like this:

        ```yaml
        indexes:
                IDX_ADDRESS_CITY:
                    columns: city_id
        ```


        but, the diff tools ignore it and give me this code:
        `$this->addSql("CREATE INDEX IDX_7299B5238BAC62AF ON tb_address (city_id)");`

         and it should be:
        `$this->addSql("CREATE INDEX IDX_ADDRESS_CITY ON tb_address (city_id)");`

        Notice: I open the same bug on the migrations repository in github and @kimhemsoe told me to open here, since this is generated by DBAL component.
        I using the Doctrine Migrations and when I declared my entity with the indexes section, the index name has been ignored. It's like this:

        indexes:
                IDX_ADDRESS_CITY:
                    columns: city_id


        but, the diff tools ignore it and give me this code:
        $this->addSql("CREATE INDEX IDX_7299B5238BAC62AF ON tb_address (city_id)");

         and it should be:
        $this->addSql("CREATE INDEX IDX_ADDRESS_CITY ON tb_address (city_id)");

        Notice: I open the same bug on the migrations repository in github and @kimhemsoe told me to open here, since this is generated by DBAL component.
        Diego Oliveira made changes -
        Attachment dbal-fixing-373.patch [ 11522 ]
        Attachment orm-fixing-373.patch [ 11523 ]
        Diego Oliveira made changes -
        Status Open [ 1 ] Awaiting Feedback [ 10000 ]
        Steve Müller made changes -
        Project Doctrine DBAL [ 10040 ] Doctrine 2 - ORM [ 10032 ]
        Key DBAL-373 DDC-3365
        Component/s Tools [ 10015 ]
        Component/s Schema Managers [ 10057 ]

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Diego Oliveira
          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated: