method

schema_default

Importance_0
v7.1.3.4 - Show latest stable - 0 notes - Class: SchemaDumper
schema_default(column) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb, line 86
        def schema_default(column)
          return unless column.has_default?
          type = @connection.lookup_cast_type_from_column(column)
          default = type.deserialize(column.default)
          if default.nil?
            schema_expression(column)
          else
            type.type_cast_for_schema(default)
          end
        end
Register or log in to add new notes.