Fixed an issue where Foreign Key columns are shown in the wrong order in SQL and Properties. #5789

This commit is contained in:
Akshay Joshi committed 2023-05-23 11:52:19 +05:30
1 parent bfa859e9ce
commit dd4639d602
2 files changed
+6 -1

No files matched your search

@@ -3,7 +3,8 @@
UNION
{% endif %}
SELECT a1.attname as conattname,
a2.attname as confattname
a2.attname as confattname,
a1.attnum as attnum
FROM pg_catalog.pg_attribute a1,
pg_catalog.pg_attribute a2
WHERE a1.attrelid={{tid}}::oid
@@ -11,3 +12,4 @@ WHERE a1.attrelid={{tid}}::oid
AND a2.attrelid={{confrelid}}::oid
AND a2.attnum={{keypair[0]}}
{% endfor %}
ORDER BY attnum;