diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-05-17 11:04:13 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-05-17 17:16:05 -0600 |
commit | 4bd5dffc85a4f3a660132eb85806a03fa5904e51 (patch) | |
tree | b14a3eecebc85ce6f70a49ee54a466e10912010e /activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb | |
parent | 7359f8190d0ac97db077096796bdc582dffa90d8 (diff) | |
download | rails-4bd5dffc85a4f3a660132eb85806a03fa5904e51.tar.gz rails-4bd5dffc85a4f3a660132eb85806a03fa5904e51.tar.bz2 rails-4bd5dffc85a4f3a660132eb85806a03fa5904e51.zip |
Add a type object to Column constructor
Part of #15134. In order to perform typecasting polymorphically, we need
to add another argument to the constructor. The order was chosen to
match the `oid_type` on `PostgreSQLColumn`.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb index 737f2daa63..0330fa762c 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb @@ -394,7 +394,9 @@ module ActiveRecord field["dflt_value"] = $1.gsub('""', '"') end - SQLite3Column.new(field['name'], field['dflt_value'], field['type'], field['notnull'].to_i == 0) + sql_type = field['type'] + cast_type = lookup_cast_type(sql_type) + SQLite3Column.new(field['name'], field['dflt_value'], cast_type, sql_type, field['notnull'].to_i == 0) end end |