@@ -487,9 +487,9 @@ def modify_types(types)
487
487
types
488
488
end
489
489
490
- def type_to_sql ( type , limit = nil , precision = nil , scale = nil )
490
+ def type_to_sql ( type , limit : nil , precision : nil , scale : nil , ** )
491
491
limit = nil if type . to_sym == :integer
492
- super ( type , limit , precision , scale )
492
+ super
493
493
end
494
494
495
495
# @private
@@ -502,7 +502,7 @@ def empty_insert_statement_value
502
502
503
503
def add_column ( table_name , column_name , type , options = { } )
504
504
# The keyword COLUMN allows to use reserved names for columns (ex: date)
505
- add_column_sql = "ALTER TABLE #{ quote_table_name ( table_name ) } ADD COLUMN #{ quote_column_name ( column_name ) } #{ type_to_sql ( type , options [ :limit ] , options [ :precision ] , options [ :scale ] ) } "
505
+ add_column_sql = "ALTER TABLE #{ quote_table_name ( table_name ) } ADD COLUMN #{ quote_column_name ( column_name ) } #{ type_to_sql ( type , options ) } "
506
506
add_column_options! ( add_column_sql , options )
507
507
execute ( add_column_sql )
508
508
end
@@ -645,7 +645,7 @@ def change_column_default(table_name, column_name, default)
645
645
end
646
646
647
647
def change_column ( table_name , column_name , type , options = { } )
648
- data_type = type_to_sql ( type , options [ :limit ] , options [ :precision ] , options [ :scale ] )
648
+ data_type = type_to_sql ( type , options )
649
649
sql = "ALTER TABLE #{ table_name } ALTER COLUMN #{ column_name } SET DATA TYPE #{ data_type } "
650
650
execute_table_change ( sql , table_name , 'Change Column' )
651
651
0 commit comments