diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-03-14 17:53:51 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-03-14 17:53:51 -0700 |
commit | cf065777d0a57f5975b2a6d1657ae8e492b855dc (patch) | |
tree | 0f9b411f5c71eb5988ed8f10ec87b30c76c7b802 | |
parent | ee460111370905b51f39c5c6566e647bb6d1d0bd (diff) | |
download | rails-cf065777d0a57f5975b2a6d1657ae8e492b855dc.tar.gz rails-cf065777d0a57f5975b2a6d1657ae8e492b855dc.tar.bz2 rails-cf065777d0a57f5975b2a6d1657ae8e492b855dc.zip |
pg is the only adapter that supports the xml type, so push the method down
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb | 9 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 4 |
2 files changed, 4 insertions, 9 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index d3abc88fd5..805832f01e 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -72,15 +72,6 @@ module ActiveRecord @base = base end - def xml(*args) - raise NotImplementedError unless %w{ - sqlite mysql mysql2 - }.include? @base.adapter_name.downcase - - options = args.extract_options! - column(args[0], :text, options) - end - # Appends a primary key definition to the table definition. # Can be called multiple times, but this is probably not a good idea. def primary_key(name) diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index a9600c0544..eb541b0215 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -338,6 +338,10 @@ module ActiveRecord self end + def xml(options = {}) + column(args[0], :text, options) + end + private def create_column_definition(base, name, type) |