class ActiveRecord::ConnectionAdapters::SchemaCache
def columns_hash(table_name)
Get the columns for a table as a hash, key is the column name
def columns_hash(table_name) @columns_hash.fetch(table_name) do @columns_hash[deep_deduplicate(table_name)] = columns(table_name).index_by(&:name).freeze end end