Skip to content

Commit 94e64a2

Browse files
committed
Remove duplicate datetime precision default
We already set the default precision for all datetime columns, so there is no need to check it in the timestamps method.
1 parent dd163f8 commit 94e64a2

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,10 +514,6 @@ def check_constraint(expression, **options)
514514
def timestamps(**options)
515515
options[:null] = false if options[:null].nil?
516516

517-
if !options.key?(:precision) && @conn.supports_datetime_with_precision?
518-
options[:precision] = 6
519-
end
520-
521517
column(:created_at, :datetime, **options)
522518
column(:updated_at, :datetime, **options)
523519
end

0 commit comments

Comments
 (0)