From 69f5629120274908600198b3eca5e7e570e8a1c6 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Sat, 18 Jul 2026 00:45:33 -0700 Subject: [PATCH] Describe Db2's index for a primary key as unique --- src/Platforms/Db2/Db2MetadataProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Platforms/Db2/Db2MetadataProvider.php b/src/Platforms/Db2/Db2MetadataProvider.php index 2ad239190b..75e5aa69f5 100644 --- a/src/Platforms/Db2/Db2MetadataProvider.php +++ b/src/Platforms/Db2/Db2MetadataProvider.php @@ -276,7 +276,7 @@ private function getIndexColumns(?string $tableName): iterable schemaName: null, tableName: $row[0], indexName: $row[1], - type: $row[2] === 'U' ? IndexType::UNIQUE : IndexType::REGULAR, + type: $row[2] === 'D' ? IndexType::REGULAR : IndexType::UNIQUE, isClustered: false, predicate: null, columnName: $row[3],