From 741ff9b1eff3096e966213f7f126cf177a4727fb Mon Sep 17 00:00:00 2001 From: ndm2 Date: Thu, 31 Aug 2023 16:56:26 +0200 Subject: [PATCH] Use better/unified index/constraint names. 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. --- .../pgsql/test_snapshot_auto_id_disabled_pgsql.php | 2 +- .../Migration/pgsql/test_snapshot_not_empty_pgsql.php | 2 +- .../sqlite/test_snapshot_auto_id_disabled_sqlite.php | 8 ++++---- .../Migration/sqlite/test_snapshot_not_empty_sqlite.php | 8 ++++---- .../Migration/sqlite/test_snapshot_plugin_blog_sqlite.php | 2 +- .../Migration/test_snapshot_auto_id_disabled.php | 2 +- tests/comparisons/Migration/test_snapshot_not_empty.php | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/comparisons/Migration/pgsql/test_snapshot_auto_id_disabled_pgsql.php b/tests/comparisons/Migration/pgsql/test_snapshot_auto_id_disabled_pgsql.php index 07ef6672..7a7ed11a 100644 --- a/tests/comparisons/Migration/pgsql/test_snapshot_auto_id_disabled_pgsql.php +++ b/tests/comparisons/Migration/pgsql/test_snapshot_auto_id_disabled_pgsql.php @@ -190,7 +190,7 @@ public function up(): void 'product_id', ], [ - 'name' => 'product_category', + 'name' => 'orders_product_category_idx', ] ) ->create(); diff --git a/tests/comparisons/Migration/pgsql/test_snapshot_not_empty_pgsql.php b/tests/comparisons/Migration/pgsql/test_snapshot_not_empty_pgsql.php index e45be9b5..52ef1496 100644 --- a/tests/comparisons/Migration/pgsql/test_snapshot_not_empty_pgsql.php +++ b/tests/comparisons/Migration/pgsql/test_snapshot_not_empty_pgsql.php @@ -159,7 +159,7 @@ public function up(): void 'product_id', ], [ - 'name' => 'product_category', + 'name' => 'orders_product_category_idx', ] ) ->create(); diff --git a/tests/comparisons/Migration/sqlite/test_snapshot_auto_id_disabled_sqlite.php b/tests/comparisons/Migration/sqlite/test_snapshot_auto_id_disabled_sqlite.php index f57be619..4ea3e675 100644 --- a/tests/comparisons/Migration/sqlite/test_snapshot_auto_id_disabled_sqlite.php +++ b/tests/comparisons/Migration/sqlite/test_snapshot_auto_id_disabled_sqlite.php @@ -112,7 +112,7 @@ public function up(): void 'slug', ], [ - 'name' => 'categories_unique_slug', + 'name' => 'categories_slug_unique', 'unique' => true, ] ) @@ -181,7 +181,7 @@ public function up(): void 'product_id', ], [ - 'name' => 'product_category', + 'name' => 'orders_product_category_idx', ] ) ->create(); @@ -254,7 +254,7 @@ public function up(): void 'slug', ], [ - 'name' => 'products_unique_slug', + 'name' => 'products_slug_unique', 'unique' => true, ] ) @@ -320,7 +320,7 @@ public function up(): void 'article_id', ], [ - 'name' => 'UNIQUE_TAG2', + 'name' => 'special_tags_article_unique', 'unique' => true, ] ) diff --git a/tests/comparisons/Migration/sqlite/test_snapshot_not_empty_sqlite.php b/tests/comparisons/Migration/sqlite/test_snapshot_not_empty_sqlite.php index d9cddddd..3239bc89 100644 --- a/tests/comparisons/Migration/sqlite/test_snapshot_not_empty_sqlite.php +++ b/tests/comparisons/Migration/sqlite/test_snapshot_not_empty_sqlite.php @@ -96,7 +96,7 @@ public function up(): void 'slug', ], [ - 'name' => 'categories_unique_slug', + 'name' => 'categories_slug_unique', 'unique' => true, ] ) @@ -150,7 +150,7 @@ public function up(): void 'product_id', ], [ - 'name' => 'product_category', + 'name' => 'orders_product_category_idx', ] ) ->create(); @@ -209,7 +209,7 @@ public function up(): void 'slug', ], [ - 'name' => 'products_unique_slug', + 'name' => 'products_slug_unique', 'unique' => true, ] ) @@ -267,7 +267,7 @@ public function up(): void 'article_id', ], [ - 'name' => 'UNIQUE_TAG2', + 'name' => 'special_tags_article_unique', 'unique' => true, ] ) diff --git a/tests/comparisons/Migration/sqlite/test_snapshot_plugin_blog_sqlite.php b/tests/comparisons/Migration/sqlite/test_snapshot_plugin_blog_sqlite.php index fb7cb7d7..4f8b32db 100644 --- a/tests/comparisons/Migration/sqlite/test_snapshot_plugin_blog_sqlite.php +++ b/tests/comparisons/Migration/sqlite/test_snapshot_plugin_blog_sqlite.php @@ -96,7 +96,7 @@ public function up(): void 'slug', ], [ - 'name' => 'categories_unique_slug', + 'name' => 'categories_slug_unique', 'unique' => true, ] ) diff --git a/tests/comparisons/Migration/test_snapshot_auto_id_disabled.php b/tests/comparisons/Migration/test_snapshot_auto_id_disabled.php index a080d6b1..6ec04c16 100644 --- a/tests/comparisons/Migration/test_snapshot_auto_id_disabled.php +++ b/tests/comparisons/Migration/test_snapshot_auto_id_disabled.php @@ -200,7 +200,7 @@ public function up(): void 'product_id', ], [ - 'name' => 'product_category', + 'name' => 'orders_product_category_idx', ] ) ->create(); diff --git a/tests/comparisons/Migration/test_snapshot_not_empty.php b/tests/comparisons/Migration/test_snapshot_not_empty.php index d860697e..5667cb30 100644 --- a/tests/comparisons/Migration/test_snapshot_not_empty.php +++ b/tests/comparisons/Migration/test_snapshot_not_empty.php @@ -165,7 +165,7 @@ public function up(): void 'product_id', ], [ - 'name' => 'product_category', + 'name' => 'orders_product_category_idx', ] ) ->create();