Skip to content

Commit 7df25bf

Browse files
authored
[postgres] retrieve foreign keys in determinist order (trial no. 2)
this failed on my macos as it returned keys in a different order, e.g. nextras orm's users_x_users was returning pk foreign keys backwards
1 parent 2cb6320 commit 7df25bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Platforms/PostgreSqlPlatform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public function getForeignKeys(string $table, ?string $schema = null): array
163163
? "AND cl.oid = '%table.%table'::regclass"
164164
: "AND cl.oid = '%table'::regclass"
165165
) . '
166-
ORDER BY atf.attnum
166+
ORDER BY at.attnum
167167
', ...$tableArgs);
168168

169169
$keys = [];

0 commit comments

Comments
 (0)