Skip to content

Commit

Permalink
Fix for #21
Browse files Browse the repository at this point in the history
Fix for #21
  • Loading branch information
beckenrode committed Nov 24, 2016
1 parent 7829358 commit 8109f04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion export-laravel-5-migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def create_tree(table_schema):
table_references = []

for key in tbl.foreignKeys:
if key.name != '':
if key.name != '' and tbl.name != key.referencedColumns[0].owner.name:
table_references.append(key.referencedColumns[0].owner.name)

tree[tbl.name] = table_references
Expand Down

0 comments on commit 8109f04

Please sign in to comment.