Skip to content

Commit

Permalink
fix test schemas: mysql requires unique index for complex fk
Browse files Browse the repository at this point in the history
  • Loading branch information
mringler committed May 22, 2024
1 parent b41476d commit d32a664
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/Fixtures/bookstore/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,10 @@
<foreign-key foreignTable="book" onDelete="setnull" phpName="Work">
<reference local="prize_book_id" foreign="id"/>
</foreign-key>
<unique>
<unique-column name="bookstore_id"/>
<unique-column name="contest_id"/>
</unique>
</table>

<table name="bookstore_contest_entry" reloadOnInsert="true">
Expand Down
4 changes: 4 additions & 0 deletions tests/Fixtures/schemas/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
<foreign-key foreignTable="bookstore" foreignSchema="bookstore_schemas" onDelete="cascade">
<reference local="bookstore_id" foreign="id"/>
</foreign-key>
<unique>
<unique-column name="id"/>
<unique-column name="bookstore_id"/>
</unique>
</table>

<table name="second_hand_book" schema="second_hand_books">
Expand Down

0 comments on commit d32a664

Please sign in to comment.