Skip to content

Commit 4241557

Browse files
authored
Fix columns order in composite primary key (#360)
1 parent 7d5469c commit 4241557

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
- Enh #355, #356: Use `DbArrayHelper::arrange()` instead of `DbArrayHelper::index()` method (@Tigrov)
4040
- New #353: Realize `Schema::loadResultColumn()` method (@Tigrov)
4141
- Enh #300: Remove realization of `Connection::createBatchQueryResult()` method (@Tigrov)
42+
- Bug #360: Fix columns order in composite primary key (@Tigrov)
4243

4344
## 1.2.0 March 21, 2024
4445

src/Schema.php

+1
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ protected function findTableConstraints(TableSchemaInterface $table, string $typ
534534
[tc].[constraint_type] = :type AND
535535
[kcu].[table_name] = :tableName AND
536536
[kcu].[table_schema] = :schemaName
537+
ORDER BY [kcu].[ordinal_position] ASC
537538
SQL;
538539

539540
return $this->db->createCommand(

0 commit comments

Comments
 (0)