Skip to content

Commit 629c85e

Browse files
committed
Update test comparison files for new FK naming convention
Update the expected FK names in comparison files and schema dumps to match the new auto-generated naming pattern (tablename_columnname).
1 parent 4085be7 commit 629c85e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed
Binary file not shown.

tests/comparisons/Diff/default/the_diff_default_mysql.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class TheDiffDefaultMysql extends BaseMigration
1616
public function up(): void
1717
{
1818
$this->table('articles')
19-
->dropForeignKey([], 'articles_ibfk_1')
19+
->dropForeignKey([], 'articles_user_id')
2020
->removeIndexByName('UNIQUE_SLUG')
2121
->removeIndexByName('rating_index')
2222
->removeIndexByName('BY_NAME')
@@ -86,7 +86,7 @@ public function up(): void
8686
])
8787
->addIndex(
8888
$this->index('user_id')
89-
->setName('categories_ibfk_1')
89+
->setName('categories_user_id')
9090
)
9191
->addIndex(
9292
$this->index('name')
@@ -101,7 +101,7 @@ public function up(): void
101101
->setReferencedColumns('id')
102102
->setOnDelete('RESTRICT')
103103
->setOnUpdate('RESTRICT')
104-
->setName('categories_ibfk_1')
104+
->setName('categories_user_id')
105105
)
106106
->update();
107107

@@ -234,7 +234,7 @@ public function down(): void
234234
->setReferencedColumns('id')
235235
->setOnDelete('CASCADE')
236236
->setOnUpdate('CASCADE')
237-
->setName('articles_ibfk_1')
237+
->setName('articles_user_id')
238238
)
239239
->update();
240240

tests/comparisons/Diff/simple/the_diff_simple_mysql.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function up(): void
7272
->setReferencedColumns('id')
7373
->setOnDelete('RESTRICT')
7474
->setOnUpdate('RESTRICT')
75-
->setName('articles_ibfk_1')
75+
->setName('articles_user_id')
7676
)
7777
->update();
7878
}

0 commit comments

Comments
 (0)