From 7df25bfa4b1a499ba2f18d94976c2f2419c12582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0kr=C3=A1=C5=A1ek?= Date: Wed, 30 Oct 2024 20:39:23 +0100 Subject: [PATCH] [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 --- src/Platforms/PostgreSqlPlatform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Platforms/PostgreSqlPlatform.php b/src/Platforms/PostgreSqlPlatform.php index 4b2fc29..b3805b2 100644 --- a/src/Platforms/PostgreSqlPlatform.php +++ b/src/Platforms/PostgreSqlPlatform.php @@ -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 = [];