Skip to content

Commit 4439f9e

Browse files
committed
Correct create index for ORM
1 parent 12aadb0 commit 4439f9e

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
Changelog
22
=========
3+
2.5.1
4+
-----
5+
6+
* Creating a correct index for ORM, without duplicating indexes for the "name" column
37

48
2.5.0
59
-----

src/Resources/config/doctrine-orm/Route.orm.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@
88
<generator strategy="AUTO"/>
99
</id>
1010

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

15-
<indexes>
16-
<index name="name_idx" columns="name"/>
17-
</indexes>
18-
14+
<unique-constraints>
15+
<unique-constraint name="name_idx" columns="name" />
16+
</unique-constraints>
1917
</entity>
2018

2119
</doctrine-mapping>

0 commit comments

Comments
 (0)