提交 4a2be83a 编写于 作者: S Sean Griffin

Remove YAML serialization workaround for columns

We are no longer including column objects in YAML serialization, thanks
to https://github.com/rails/rails/pull/15621
上级 ef4e0787
......@@ -13,7 +13,7 @@ module Format
ISO_DATETIME = /\A(\d{4})-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)(\.\d+)?\z/
end
attr_reader :name, :cast_type, :sql_type, :default_function
attr_reader :name, :cast_type, :null, :sql_type, :default_function
delegate :type, :precision, :scale, :limit, :klass, :accessor,
:text?, :number?, :binary?, :serialized?, :changed?,
......@@ -34,7 +34,7 @@ def initialize(name, default, cast_type, sql_type = nil, null = true)
@name = name
@cast_type = cast_type
@sql_type = sql_type
@nullable = null
@null = null
@original_default = default
@default_function = nil
end
......@@ -61,10 +61,6 @@ def with_type(type)
clone.instance_variable_set('@cast_type', type)
end
end
def null
@nullable
end
end
class NullColumn < Column
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册