Skip to content

Commit

Permalink
Use better/unified index/constraint names.
Browse files Browse the repository at this point in the history
This should help to make identifying problems easier, as it's clear
whether the name denotes an index or a foreign key, and to
which tables they belong.
  • Loading branch information
ndm2 authored and othercorey committed Sep 22, 2023
1 parent 1a185c8 commit 741ff9b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public function up(): void
'product_id',
],
[
'name' => 'product_category',
'name' => 'orders_product_category_idx',
]
)
->create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function up(): void
'product_id',
],
[
'name' => 'product_category',
'name' => 'orders_product_category_idx',
]
)
->create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function up(): void
'slug',
],
[
'name' => 'categories_unique_slug',
'name' => 'categories_slug_unique',
'unique' => true,
]
)
Expand Down Expand Up @@ -181,7 +181,7 @@ public function up(): void
'product_id',
],
[
'name' => 'product_category',
'name' => 'orders_product_category_idx',
]
)
->create();
Expand Down Expand Up @@ -254,7 +254,7 @@ public function up(): void
'slug',
],
[
'name' => 'products_unique_slug',
'name' => 'products_slug_unique',
'unique' => true,
]
)
Expand Down Expand Up @@ -320,7 +320,7 @@ public function up(): void
'article_id',
],
[
'name' => 'UNIQUE_TAG2',
'name' => 'special_tags_article_unique',
'unique' => true,
]
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function up(): void
'slug',
],
[
'name' => 'categories_unique_slug',
'name' => 'categories_slug_unique',
'unique' => true,
]
)
Expand Down Expand Up @@ -150,7 +150,7 @@ public function up(): void
'product_id',
],
[
'name' => 'product_category',
'name' => 'orders_product_category_idx',
]
)
->create();
Expand Down Expand Up @@ -209,7 +209,7 @@ public function up(): void
'slug',
],
[
'name' => 'products_unique_slug',
'name' => 'products_slug_unique',
'unique' => true,
]
)
Expand Down Expand Up @@ -267,7 +267,7 @@ public function up(): void
'article_id',
],
[
'name' => 'UNIQUE_TAG2',
'name' => 'special_tags_article_unique',
'unique' => true,
]
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function up(): void
'slug',
],
[
'name' => 'categories_unique_slug',
'name' => 'categories_slug_unique',
'unique' => true,
]
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public function up(): void
'product_id',
],
[
'name' => 'product_category',
'name' => 'orders_product_category_idx',
]
)
->create();
Expand Down
2 changes: 1 addition & 1 deletion tests/comparisons/Migration/test_snapshot_not_empty.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public function up(): void
'product_id',
],
[
'name' => 'product_category',
'name' => 'orders_product_category_idx',
]
)
->create();
Expand Down

0 comments on commit 741ff9b

Please sign in to comment.