Fix a foreign key lookup bug.
This commit is contained in:
parent
59c7496521
commit
9a80de4103
1 changed files with 1 additions and 1 deletions
|
@ -179,7 +179,7 @@ func (p *PostgresDriver) ForeignKeyInfo(tableName string) ([]bdb.ForeignKey, err
|
||||||
from information_schema.table_constraints as tc
|
from information_schema.table_constraints as tc
|
||||||
inner join information_schema.key_column_usage as kcu ON tc.constraint_name = kcu.constraint_name
|
inner join information_schema.key_column_usage as kcu ON tc.constraint_name = kcu.constraint_name
|
||||||
inner join information_schema.constraint_column_usage as ccu ON tc.constraint_name = ccu.constraint_name
|
inner join information_schema.constraint_column_usage as ccu ON tc.constraint_name = ccu.constraint_name
|
||||||
where tc.table_name = $1 and tc.constraint_type = 'FOREIGN KEY' and tc.table_schema = 'information_schema';`
|
where tc.table_name = $1 and tc.constraint_type = 'FOREIGN KEY' and tc.table_schema = 'public';`
|
||||||
|
|
||||||
var rows *sql.Rows
|
var rows *sql.Rows
|
||||||
var err error
|
var err error
|
||||||
|
|
Loading…
Add table
Reference in a new issue