Skip to content

Commit

Permalink
Merge pull request #2183 from koic/refactor_schema_creation_to_extrac…
Browse files Browse the repository at this point in the history
…t_new_foreign_key_definition

Refactor schema creation to extract `new_foreign_key_definition`
  • Loading branch information
yahonda authored May 3, 2021
2 parents 1ee85e5 + 10490ab commit 145b007
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def visit_TableDefinition(o)
statements << accept(o.primary_keys) if o.primary_keys

if supports_foreign_keys?
statements.concat(o.foreign_keys.map { |to_table, options| foreign_key_in_create(o.name, to_table, options) })
statements.concat(o.foreign_keys.map { |fk| accept fk })
end

create_sql << "(#{statements.join(', ')})" if statements.present?
Expand Down

0 comments on commit 145b007

Please sign in to comment.