Fix erroneously flagged join tables
This commit is contained in:
parent
9402c8fe07
commit
66dbe6a74c
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ func Tables(db Interface, schema string, whitelist, blacklist []string) ([]Table
|
||||||
// A composite primary key involving two columns
|
// A composite primary key involving two columns
|
||||||
// Both primary key columns are also foreign keys
|
// Both primary key columns are also foreign keys
|
||||||
func setIsJoinTable(t *Table) {
|
func setIsJoinTable(t *Table) {
|
||||||
if t.PKey == nil || len(t.PKey.Columns) != 2 || len(t.FKeys) < 2 {
|
if t.PKey == nil || len(t.PKey.Columns) != 2 || len(t.FKeys) < 2 || len(t.Columns) > 2 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue