lib/ridgepole/dsl_parser/context.rb in ridgepole-0.7.3 vs lib/ridgepole/dsl_parser/context.rb in ridgepole-0.7.4
- old
+ new
@@ -84,9 +84,11 @@
def add_foreign_key(from_table, to_table, options = {})
from_table = from_table.to_s
to_table = to_table.to_s
options[:name] = options[:name].to_s if options[:name]
+ options[:primary_key] = options[:primary_key].to_s if options[:primary_key]
+ options[:column] = options[:column].to_s if options[:column]
@__definition[from_table] ||= {}
@__definition[from_table][:foreign_keys] ||= {}
idx = options[:name] || [from_table, to_table]
if @__definition[from_table][:foreign_keys][idx]