From 8f8f8058e58dda20259c1caa61ec92542573643d Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Thu, 1 Jan 2015 08:58:47 -0700 Subject: Stop passing the column to the connection adapter when quoting defaults The column is no longer used for anything besides type casting, which is what we're trying to remove from the column entirely. --- .../lib/active_record/connection_adapters/abstract/schema_creation.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb index 896691d249..18ff869ea6 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb @@ -99,9 +99,9 @@ module ActiveRecord def quote_default_expression(value, column) column.sql_type ||= type_to_sql(column.type, column.limit, column.precision, column.scale) - column.cast_type ||= type_for_column(column) + value = type_for_column(column).type_cast_for_database(value) - @conn.quote(value, column) + @conn.quote(value) end def options_include_default?(options) -- cgit v1.2.3