diff options
author | Greg Reinacker <gregr@rassoc.com> | 2011-10-21 17:30:39 -0600 |
---|---|---|
committer | Greg Reinacker <gregr@rassoc.com> | 2011-10-21 17:30:39 -0600 |
commit | f092be821db4a2e8f142e8f0b9d08e497ccf2eb2 (patch) | |
tree | faade0dae95ebc78dda2d22d515f8a58c32bbb4a /activerecord/lib/active_record/connection_adapters | |
parent | 79d01a8f16e20c556a086a2f07e3ccb4400f9819 (diff) | |
download | rails-f092be821db4a2e8f142e8f0b9d08e497ccf2eb2.tar.gz rails-f092be821db4a2e8f142e8f0b9d08e497ccf2eb2.tar.bz2 rails-f092be821db4a2e8f142e8f0b9d08e497ccf2eb2.zip |
preserve decimal column attributes after migration
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb index 1932a849ee..e0e957a12c 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb @@ -413,6 +413,8 @@ module ActiveRecord self.limit = options[:limit] if options.include?(:limit) self.default = options[:default] if include_default self.null = options[:null] if options.include?(:null) + self.precision = options[:precision] if options.include?(:precision) + self.scale = options[:scale] if options.include?(:scale) end end end @@ -467,6 +469,7 @@ module ActiveRecord @definition.column(column_name, column.type, :limit => column.limit, :default => column.default, + :precision => column.precision, :scale => column.scale, :null => column.null) end @definition.primary_key(primary_key(from)) if primary_key(from) |