Skip to content

Commit

Permalink
Dont put precision as 6 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Lavika committed Nov 3, 2023
1 parent 38de89e commit 6503956
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def smalldatetime(*names, **options)
def datetime(*names, **options)
names.each do |name|
if options[:precision]
column(name, :datetime, **options)
datetime2(name, **options)
else
column(name, :datetime, **options)
end
Expand Down Expand Up @@ -103,10 +103,10 @@ def new_column_definition(name, type, **options)
case type
when :datetime, :timestamp
# If no precision then default it to 6.
options[:precision] = 6 unless options.key?(:precision)
# options[:precision] = 6 unless options.key?(:precision)

# If there is precision then column must be of type 'datetime2'.
type = :datetime2 unless options[:precision].nil?
type = :datetime2 if options[:precision]
when :primary_key
options[:is_identity] = true
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def fractional_operator
end

def fractional_precision
0.003333
0.00333
end

def fractional_scale
Expand Down

0 comments on commit 6503956

Please sign in to comment.