Create a gist now

Instantly share code, notes, and snippets.

sqlite_adapter.rb patch for precision/scale updates (rails 3.0)
File:
ruby-1.9.2-p0/lib/ruby/gems/1.9/gems/activerecord-3.0.0/lib/active_record/connection_adapters/sqlite_adapter.rb
Method: copy_table (line 315 in my copy)
Update the following:
@definition.column(column_name, column.type,
:limit => column.limit, :default => column.default,
:null => column.null)
to:
@definition.column(column_name, column.type,
:limit => column.limit, :default => column.default,
:precision => column.precision, :scale => column.scale,
:null => column.null)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment