Skip to content

Commit ed2b2d3

Browse files
committed
Fix index names in MySQL comparison files
When MySQL creates an implicit index for a FK, the index name matches the FK constraint name. With the auto-generated FK naming change, indexes are now named 'articles_user_id' instead of 'user_id'.
1 parent e34648e commit ed2b2d3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
Binary file not shown.

tests/comparisons/Diff/default/the_diff_default_mysql.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function up(): void
2020
->removeIndexByName('UNIQUE_SLUG')
2121
->removeIndexByName('rating_index')
2222
->removeIndexByName('BY_NAME')
23-
->removeIndexByName('user_id')
23+
->removeIndexByName('articles_user_id')
2424
->update();
2525

2626
$this->table('articles')
@@ -215,7 +215,7 @@ public function down(): void
215215
)
216216
->addIndex(
217217
$this->index('user_id')
218-
->setName('user_id')
218+
->setName('articles_user_id')
219219
)
220220
->update();
221221

0 commit comments

Comments
 (0)