lib/ridgepole/diff.rb in ridgepole-0.9.6 vs lib/ridgepole/diff.rb in ridgepole-1.0.0

- old
+ new

@@ -39,11 +39,11 @@ end end scan_relation_info(relation_info) - unless @options[:merge] || @options[:skip_drop_table] + if !@options[:merge] && @options[:force_drop_table] from.each do |table_name, from_attrs| next unless target?(table_name) delta[:delete] ||= {} delta[:delete][table_name] = from_attrs @@ -417,9 +417,12 @@ opts[:limit] = 16_777_215 when :long opts[:limit] = 4_294_967_295 end end + + # Workaround for Active Record 7.0 + opts.delete(:precision) if attrs[:type] == :datetime && opts[:precision].nil? end end def normalize_index_options!(opts) # XXX: MySQL only?