lib/ridgepole/diff.rb in ridgepole-0.4.8.rc1 vs lib/ridgepole/diff.rb in ridgepole-0.4.8.rc2
- old
+ new
@@ -77,10 +77,14 @@
scan_options_change(table_name, from[:options], to[:options], table_delta)
scan_definition_change(from[:definition], to[:definition], from[:indices], table_delta)
scan_indices_change(from[:indices], to[:indices], to[:definition], table_delta, from[:options], to[:options])
+ if @options[:enable_foreigner]
+ Ridgepole::ForeignKey.scan_foreign_keys_change(from[:foreign_keys], to[:foreign_keys], table_delta, @options)
+ end
+
unless table_delta.empty?
delta[:change] ||= {}
delta[:change][table_name] = table_delta
end
end
@@ -249,10 +253,10 @@
if not opts.has_key?(:default) and opts[:null]
opts[:default] = nil
end
# XXX: MySQL only?
- unless @options[:disable_mysql_unsigned]
+ if @options[:enable_mysql_unsigned]
opts[:unsigned] = false unless opts.has_key?(:unsigned)
end
end
def normalize_index_options!(opts)