method

new_column_from_field

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: SchemaStatements
new_column_from_field(table_name, field, definitions) 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/sqlite3/schema_statements.rb, line 135
          def new_column_from_field(table_name, field, definitions)
            default = field["dflt_value"]

            type_metadata = fetch_type_metadata(field["type"])
            default_value = extract_value_from_default(default)
            default_function = extract_default_function(default_value, default)
            rowid = is_column_the_rowid?(field, definitions)

            Column.new(
              field["name"],
              default_value,
              type_metadata,
              field["notnull"].to_i == 0,
              default_function,
              collation: field["collation"],
              auto_increment: field["auto_increment"],
              rowid: rowid
            )
          end
Register or log in to add new notes.