Skip to content

Commit

Permalink
Merge pull request #226 from k1LoW/fix-hide-excluded-table-link
Browse files Browse the repository at this point in the history
Remove relations of excluded tables
  • Loading branch information
k1LoW authored May 1, 2020
2 parents 78da408 + 00dc30b commit 2723fa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ func excludeTableFromSchema(name string, s *schema.Schema) error {
// ChildRelations
childRelations := []*schema.Relation{}
for _, r := range c.ChildRelations {
if r.Table.Name != name {
if r.Table.Name != name && r.ParentTable.Name != name {
childRelations = append(childRelations, r)
}
}
Expand All @@ -355,7 +355,7 @@ func excludeTableFromSchema(name string, s *schema.Schema) error {
// ParentRelations
parentRelations := []*schema.Relation{}
for _, r := range c.ParentRelations {
if r.Table.Name != name {
if r.Table.Name != name && r.ParentTable.Name != name {
parentRelations = append(parentRelations, r)
}
}
Expand Down

0 comments on commit 2723fa2

Please sign in to comment.