#primary_keys(table_name)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/schema_cache.rb', line 42
def primary_keys(table_name) @primary_keys[table_name] ||= data_source_exists?(table_name) ? connection.primary_key(table_name) : nil end