Skip to content

Commit

Permalink
Merge pull request #469 from FaritSlv/master
Browse files Browse the repository at this point in the history
Correct create index for ORM
  • Loading branch information
dbu authored Sep 15, 2021
2 parents 12aadb0 + 4439f9e commit e9c3dfb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Changelog
=========
2.5.1
-----

* Creating a correct index for ORM, without duplicating indexes for the "name" column

2.5.0
-----
Expand Down
10 changes: 4 additions & 6 deletions src/Resources/config/doctrine-orm/Route.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@
<generator strategy="AUTO"/>
</id>

<!-- we hardcode the column name to overwrite column naming strategies as we have to define the index on the column name -->
<field name="name" type="string" unique="true" column="name"/>
<field name="name" type="string" column="name"/>
<field name="position" type="integer"/>

<indexes>
<index name="name_idx" columns="name"/>
</indexes>

<unique-constraints>
<unique-constraint name="name_idx" columns="name" />
</unique-constraints>
</entity>

</doctrine-mapping>

0 comments on commit e9c3dfb

Please sign in to comment.