Skip to content

Commit

Permalink
[postgres] retrieve foreign keys in determinist order (trial no. 2)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hrach authored Oct 30, 2024
1 parent 2cb6320 commit 7df25bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Platforms/PostgreSqlPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public function getForeignKeys(string $table, ?string $schema = null): array
? "AND cl.oid = '%table.%table'::regclass"
: "AND cl.oid = '%table'::regclass"
) . '
ORDER BY atf.attnum
ORDER BY at.attnum
', ...$tableArgs);

$keys = [];
Expand Down

0 comments on commit 7df25bf

Please sign in to comment.