提交 cf065777 编写于 作者: A Aaron Patterson

pg is the only adapter that supports the xml type, so push the method down

上级 ee460111
......@@ -72,15 +72,6 @@ def initialize(base)
@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)
......
......@@ -338,6 +338,10 @@ def column(name, type = nil, options = {})
self
end
def xml(options = {})
column(args[0], :text, options)
end
private
def create_column_definition(base, name, type)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册