Skip to content

Commit e2e82ea

Browse files
authored
fix: excludes constraints which aren't primary keys
The previous version of this file was returning all columns which had unique constraints. This change excludes these columns unless they are primary keys
1 parent 7b41aac commit e2e82ea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib/sql/primary_keys.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ WHERE
1515
AND pg_class.relnamespace = pg_namespace.oid
1616
AND pg_attribute.attrelid = pg_class.oid
1717
AND pg_attribute.attnum = ANY (pg_index.indkey)
18+
AND indisprimary

0 commit comments

Comments
 (0)