Skip to content

Commit

Permalink
Merge pull request #1313 from caleblloyd/psql-ignore-cross-schema-fk
Browse files Browse the repository at this point in the history
postgresql - ignore cross-schema FKs
  • Loading branch information
stephenafamo authored Oct 3, 2023
2 parents 59e63d5 + c62ffbe commit 644d45d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/sqlboiler-psql/driver/psql.go
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ func (p *PostgresDriver) foreignKeyInfoFromDB(schema, tableName string) ([]drive
from pg_namespace pgn
inner join pg_class pgc on pgn.oid = pgc.relnamespace and pgc.relkind = 'r'
inner join pg_constraint pgcon on pgn.oid = pgcon.connamespace and pgc.oid = pgcon.conrelid
inner join pg_class dstlookupname on pgcon.confrelid = dstlookupname.oid
inner join pg_class dstlookupname on pgcon.confrelid = dstlookupname.oid and pgn.oid = dstlookupname.relnamespace
inner join pg_attribute pgasrc on pgc.oid = pgasrc.attrelid and pgasrc.attnum = ANY(pgcon.conkey)
inner join pg_attribute pgadst on pgcon.confrelid = pgadst.attrelid and pgadst.attnum = ANY(pgcon.confkey)
where %s
Expand Down

0 comments on commit 644d45d

Please sign in to comment.